Hi,
Hope some one can help me on this
I have a master table called "Contacts" and a history table called "Contact_History"
In the history table the languages spoken by a contact are stored as each records
Contact 1 has 2 history records for (lang A & lang B)
Contact 2 has 2 history records for (lang B & lang A)
Contact 3 has 2 history records for (lang A & lang C)
Question;
How to Query from the Contact table which are the contacts who can speak both languages A & B.
I should get only 2 records (Contact 1 & 2 but not 3 though he can speak any one of lang A or B)
something like this??
[blue]SELECT a.* FROM CONTACTS a, CONTACT_History b WHERE a.CONTACT_id = b.CONTACT_id AND a.CONTACT_id IN (select from the history file which has both lang a & b)
[/blue]
I'm struggling with for hours now.. Your help will much appreciated
Thanks
Ahmad
Hong Kong
Hope some one can help me on this
I have a master table called "Contacts" and a history table called "Contact_History"
In the history table the languages spoken by a contact are stored as each records
Contact 1 has 2 history records for (lang A & lang B)
Contact 2 has 2 history records for (lang B & lang A)
Contact 3 has 2 history records for (lang A & lang C)
Question;
How to Query from the Contact table which are the contacts who can speak both languages A & B.
I should get only 2 records (Contact 1 & 2 but not 3 though he can speak any one of lang A or B)
something like this??
[blue]SELECT a.* FROM CONTACTS a, CONTACT_History b WHERE a.CONTACT_id = b.CONTACT_id AND a.CONTACT_id IN (select from the history file which has both lang a & b)
[/blue]
I'm struggling with for hours now.. Your help will much appreciated
Thanks
Ahmad
Hong Kong