help with a query

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a sales table with SalesNumber and PoductNumber Fields, among others
eg

1 23
2 24
2 25
3 21
4 25
5 25

So for 1 sale, i can have multiple entries.

I have managed to write a query to find all sales with item number 25 in,
which in this case would return

2, 4, 5

I now need to find all sales with item 24 AND 25 in which would return only

2

Can anyone help me in witing this query as i am pulling my hair out over
this

thanks in advance
Dave
 
I have tried that ansd if i use OR then all results with 24 or 25 in are
displayed and i cant use AND because they are 2 seperate records so each
record only has 1 product number.

I have actually been giving this sonme thought i i have decided to try the
folowing.

run a query to populate a temp table witht the first filter 24

the run a second query to filter out the ones with out 25 and then

the result should hold the answers *fingers crossed*

Thanks for the help

Dave
 
Back
Top