5/1/08

Customers who have not bought a particular item

SELECT CUSTNMBR
FROM dbo.RM00101 r
WHERE (CUSTNMBR NOT IN (SELECT DISTINCT custnmbr
FROM sop30200 h JOIN
sop30300 l ON l.sopnumbe = h.sopnumbe AND h.soptype = l.soptype
WHERE itemnmbr LIKE 'DGHB'))

No comments: