Microsoft
Software
Hardware
Network
Question : SQL Query Help
I have a table that looks similar to this.
Customer_ID Product_id
100 5000
100 5001
100 5002
101 5001
101 5002
I need to figure out a query that can show me every customer that has purchased products 5001 and 5002 but NOT 5000
In the example above, the query would bring back customer 101 since customer 100 did order product 5000.
Thanks.
Answer : SQL Query Help
Probably many ways to do this, but one is:
select distinct CustomerID
from CustProd
where ProductID in (5001, 5002)
and not CustomerID in (
select CustomerID
from CustProd
where ProductID in (5000))
Random Solutions
cgi procress page
The designer must create an instance of type 'Microsoft.VisualBasic.Com
patibility
.VB6.BaseC
ontrolArra
y' but it cannot because the type is declared as abstract.
Configuring Wireless Computer Authentication with Certificates in Windows 7
looking for a powerful ActionScript 3 isometric engine
Internal Server Error
moth balls around the home
Return a value if date field is equal to the present date.
Can we split name in HTML
Need to export Eudora Pro E-mail and import it into new Windows 7 Live Mail.
laptop setup win 7 64bit with 32bit xp pro emulator