Can the Dems Turn the US into Iraq by having the Superdelegates Select Hillary Over Obama?

Posted by admin on November 29th, 2009 and filed under select into | 10 Comments »


If that happens there will be blood shed on the streets in the riots.

SQL: Cant link sub-queries?

Posted by admin on November 29th, 2009 and filed under subquery | 3 Comments »

Im supposed to list the names of actors who have stared in more than 3 films

This is wrong but its all i can think of and everything needed should be there.

SELECT fname, surname
FROM actor
WHERE a_id=(SELECT actor_id FROM acts WHERE movie_id=(SELECT Count(*) FROM acts GROUP BY actor_id HAVING (COUNT(*)>3)));

Its wrong in the first subquery but i dont know what to do?
SELECT fname, surname
FROM actor
WHERE a_id=(SELECT actor_id FROM acts GROUP BY actor_id HAVING (COUNT(*)>3));

This is better but wont work because the sub querie returns 2 answers and it only allows 1 for sub queries?

SELECT fname, surname
FROM actor
WHERE a_id IN (SELECT actor_id FROM acts GROUP BY actor_id HAVING (COUNT(*)>3));

SQL inner join and counting query?

Posted by admin on November 29th, 2009 and filed under inner join | 3 Comments »

How do I join 3 tables and display all the columns by using INNER JOIN and ON?

How do I count the number of employees in a table where the employee does not have a middle initial? How do I write this condition?

Can anyone help me with the syntax? I wrote different queries and always got syntax errors for them.

Thanks.

1. select * from TableA
inner join TableB
on a.Field = b.Field and a.Field2 = b.Field2
inner join TableC
on b.FieldC = c.FieldC
GO

2. Select count(*) from Employees
where isnull(MiddleInitial,”) = ”
GO

help with a SQL script?

Posted by admin on November 29th, 2009 and filed under select distinct | 1 Comment »

Hello,

I am very much a beginner with SQL, and I was hoping for some help with a script.

I need to pull records from a table with distinct values for one of the fields and a given value for another field. I want the results to include all of the fields.

In other words…I need a combination of:

select * from tableABC where name = ‘Scott’
&
select distinct ProductName from tableABC

Thanks for any help.

Try the following SQL statement:

SELECT DISTINCT tableABC.Name,
tableABC.Product
FROM tableABC
WHERE (((tableABC.Name)="Scott"));

The DISTINCT should only pull unique values for the Product, but allow every instance of Name = Scott.

This is different than using the DISTINCTROW.

Though I would probably have never created a relational database where these two fields were within the same table. They would have been two separate tables, connected by a Join on some Unique Key.

What is a group of children that has been affected by war?

Posted by admin on November 29th, 2009 and filed under group by | 1 Comment »

I’m doing an assignment on a group of children that has been affected by war.
eg: Jewish children in the Holocaust.
I want one that no-one else will likely be doing in the class, but that has a lot of Information about it.

=D

Try the Invisible Children Program. I forgot what country it takes place in, but they are forced to join an army and kill people. They "serve" under Joseph Cony. Look it up.

MacBook Pro spits out every single disk I insert into it. How can I fix this?

Posted by admin on November 29th, 2009 and filed under insert into | 2 Comments »

Every time I try to insert a CD into my MacBook pro it will attempt to read it for a few seconds and then instantly spit it out. I have tried various CD’s, from software to music to games. Nothing will spin more than 5 seconds before getting ejected automatically.

Is this a problem within my MacBook Pro software or would the actual disk drive be ruined?

The entire DVD drive have to be replace. Unfortunately, no one is able to fix it because it is a Mac. You will have to live with the consequences of buying from Apple.

How do I create a database model where a person can belong to multiple tables?

Posted by admin on November 29th, 2009 and filed under database | 2 Comments »

The tables someone can belong to are client, employee, volunteer, member, and donor. A person has to be in at least one of these categories but can be in any number of the others. What is the most efficient way to design this database?

Using Foreign Keys,

Create a table for Person with id as the primary key
and point this id as the foreign key in whatever table u need to use a person.

Is it hard to get a publishing agency to reply back to your query letter?

Posted by admin on November 29th, 2009 and filed under query | 2 Comments »

I recently sent my query letter to this publishing agency. About a week later I got a reply. I wasn’t really excpecting a reply becuase I’ve been told that agencies are really particular and they only reply to such things that could be in their interest or topic…

I told them all my information and story sypnosis and they replyed and told me to send the first three chapters to them as soon as possible. Do alot of places do this or is this good?

Congrats on the partial request. Yes, it’s good, but not all agencies do this. They only request it from those who’s queries interest them, and most people will get turned down.

There are some agents that won’t reply at all if they don’t like your query, so no response means a rejection in those cases. Most agencies will respond with some kind of rejection form letter if they don’t like your query. If they like it then of course they’ll request a partial manuscript. How long it takes the agent to reply depends on the agent. Some reply within hours or days and a few extreme cases have been a year or more. Most take a few weeks to a couple of months.

What is the Recriutment Process to get select into Yahoo?

Posted by admin on November 17th, 2009 and filed under select into | 1 Comment »

I am pursuing my MCA I wanna to join into Software companies like Yahoo, Google, IBM

Log on to http://careers.yahoo.com/

I need some help writing a sql query?

Posted by admin on November 17th, 2009 and filed under subquery | 1 Comment »

I am wanting to figure out how to write a query that will select specific rows from different tables, which shouldnt be a problem, i will just use the related keys to relate the tables. there is one table that I need to do something different with. In this table, the key will relate to another table fine, but then there is another field that has a number value and each of these number values mean different things. for instance, The key in this table may be the number "5". There could be 20 values for "5" with the value in one of the rows different in each, which that is the row that tells me what the record is for. more specifically, lets say there is a table called claimant and the table in question is called Sub_Data. They will be related by the key claimant_id. WHen they are related, the Sub_Data table has a field called value and a field called ID. The ID field is a number that can be translated to tell me what the generic field value is a value for. I want to do a select where I can get all of the claimant values, with the Sub_Data.Value field when it is a certain value only. This is what I have gotten, but it doesnt work, and i know why it doesnt work, just putting it down to give people an idea….

select *, (select value from Sub_Data, claimant where Sub_Data.claimant_id = Claimant.claimant_id and Sub_Data.id = ‘72′) as B from Claimant

The above returns multiple rows on the subquery which obviously wont work,
Any ideas? this was kind of hard to explain so it may be confusing…

Thnks Keg, I will try that tomorrow and see if that is what I am looking for
ok, same question but I need to add something, what if I want to also get the result where the id is say ‘22′, ‘72′, and ‘600′ for each claimant id; how would I get a select statement where it returns all the results for claimant along with columns of the result of value with the above 3 ids from the sub_data table?

You can do this by referencing the sub_data table under 3 aliases.

select
c.*,
s72.value as value_72,
s22.value as value_22,
s600.value as value_600
from
claimant c
left outer join sub_data s72
on c.claimant_id = s72.claimant_id and
s72.id = ‘72′
left outer join sub_data s22
on c.claimant_id = s22.claimant_id and
s22.id = ‘22′
left outer join sub_data s600
on c.claimant_id = s600.claimant_id and
s600.id = ‘600′