search query

Joined
Jan 20, 2012
Messages
2
Reaction score
0
I have a table like one below with discrete configurations and need to search config field multiple times to get best configuration match.
For example in a table below I would like to list only the items that have config (SPECIAL2 & SPECIAL 7). Correct answer should be item (C,D). Please advise on SQL to achieve that. I am using access.



ITEM CONFIG
A A
A SPECIAL1
A SPECIAL2
A SPECIAL3
A SPECIAL11
A SPECIAL12
B B
B SPECIAL5
B SPECIAL6
B SPECIAL7
B SPECIAL8
C C
C SPECIAL2
C SPECIAL6
C SPECIAL7
C SPECIAL22
C SPECIAL23
C SPECIAL24
D D
D SPECIAL1
D SPECIAL2
D SPECIAL7


Following query did not work. Using OR works but givems me extra results that I don`t want.
SELECT CONFIG.[ITEM], CONFIG.[CONFIG1]
FROM CONFIG
WHERE (((CONFIG.[CONFIG1])="SPECIAL2" And (CONFIG.[CONFIG1])="SPECIAL7"));


Really appreciate any help with this. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top