• Something like this?

    SELECT DISTINCT

    CustId

    FROM

    (

    SELECT

    CustId

    FROM

    product_details

    WHERE

    ProdId = 1

    AND CustId IN (SELECT DISTINCT CustId FROM product_details WHERE ProdId = 4)

    EXCEPT

    SELECT CustId

    FROM

    product_details

    WHERE

    ProdId = 0

    ) AS A

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe