Im abit stuck on a query using 'AND' operator... and wondered if someone could point out where Im going wrong.
I have a table that looks abit like this (Id is a counter field) as other fields are not unique:-
Id Transaction Profile
DOG X
CAT X
FROG X
DOG Y
CAT Y
FROG Y
DOG Z
CAT Z
I want to do a query to bring me out the results of all profiles which contain specific Transactions and only ones that contain all the ‘Transactions’ I specify.
I thought this was simple (ha ha) and I could do this using the AND operator ie.
SELECT Table1.counter, Table1.Transaction, Table1.Profile
FROM Table1
WHERE (((Table1.Transaction)="dog" And (Table1.Transaction)="cat"));
Unfortunately I get no results for this? Any ideas anybody?
Am I wasting my time doing it this way via SQL - should I be trying to write some VBA to get these results do you think?
Appreciate any help anyone could give us... have got brain ache from looking at it now!!
Thanks!
Enter your message below
Sign in or Join us (it's free).