Hi everyone
I have a small problem, which is making it impossible to acheive my db aims!
I would like to know how to write a query that will tell me if a field item is in IN another table, without returning the value. i.e. returning a YES or NO instead of the matching record.
The second data set will have multiple recurrences of each record if it IS present in the data, so if I use an outer join I get extra data returned which I dont want!!
All i want to do is something along the lines of
SELECT Table1.[ID] FROM Table1
IIf((Table1.[ID] In Table2.[ID]), "YES", "NO");
This will need to be done for 8 secondary tables, resulting in a list with ID, and then 8 yes or nos showing which other tables it is present in.
So far, this isn't working, and I need to resolve this fast!
Please someone point out my mistake :)
thanks everyone
Nat
I have a small problem, which is making it impossible to acheive my db aims!
I would like to know how to write a query that will tell me if a field item is in IN another table, without returning the value. i.e. returning a YES or NO instead of the matching record.
The second data set will have multiple recurrences of each record if it IS present in the data, so if I use an outer join I get extra data returned which I dont want!!
All i want to do is something along the lines of
SELECT Table1.[ID] FROM Table1
IIf((Table1.[ID] In Table2.[ID]), "YES", "NO");
This will need to be done for 8 secondary tables, resulting in a list with ID, and then 8 yes or nos showing which other tables it is present in.
So far, this isn't working, and I need to resolve this fast!
Please someone point out my mistake :)
thanks everyone
Nat
Comment