Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

match 3 out of n number of records

$
0
0
Hi Guys,

can someone help me, I have a invoice that has multiple items on it and I trying to find which invoices have a certain 3 item_ids.


here is an example of an invoice

customer# invoice item_id amount
000001 123 111 10.00
000001 123 222 12.00
000001 123 333 16.00
000001 123 444 20.00
000001 123 555 22.00


Can someone please let me find all invoices with items 111,222,333 ?

I tired item_id IN (111,222,333) but IN acts as an OR but what I need is an AND.

thanks

Viewing all articles
Browse latest Browse all 13329

Trending Articles