Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not(not in ()) ? how ?

Status
Not open for further replies.

namida

Programmer
May 29, 2003
101
AU
My logic is all mixed up

I have a table for language choice


login* prefno* lang_spo
1 1 English
1 2 Chinese
1 3 French
2 1 English
2 2
2 3

Login and prefno are primary keys

The pref no means the preference order. which means login 1 is probably most proficient in English

Login 2 can only speak English but a slot is always always allocated "empty" (this doesn't actually matter)

What I Want is to find who can speak English AND chinese AND French

how do I do that?

if I use IN('English','Chinese','French') It chooses 1 and 2 (since it's anything that matches the IN params )while I just want login 1 to be displayed?

Regards,

Namida
 
Code:
select login from t
where lang_spo in ('English','Chinese','French')
group by login
having count(*) = 3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top