Hello Every One, I have a problem in retrieving records from SQL Server compact edition database.
I have two tables:-
1. Name= GroupTask , PK=GTaskID
GTaskID | GTaskSubject | GTaskBody | GTaskDeadline
|
---|
1001 | Do Somthing | Bla bla bla... | 3/31/2011
|
2.Name=GroupTaskDetails , FK=GTaskID ,UserName
GTaskID | UserName
|
---|
1001 | A |
1001 | B |
1001 | C |
many rows are there like above...
Now:-
1.
I want to get * from GroupTask table for such tasks on which A,B & C all are
assigned.
2.
I want to get * from GroupTask table for such tasks on which A,B & Z all are assigned.
when I use:- username in('A','B','Z') it returns 1001 but Z is not on 1001
I need AND condition not OR Condition that is what IN predicate does.
Any idea?
Thanks in advance.