Hi,

Ive got this query:

        SELECT DISTINCT col.ColorCode, col.ColorPic FROM
        (Stock stk INNER JOIN Colors col on col.ColorCode=stk.ColorCode)
        INNER JOIN ItemPics ip on ip.StockID=stk.StockID
        WHERE stk.StockID=#StockID# AND (stk.Quantity > 0 OR ip.Priority = 'A')
        ORDER BY col.ColorCode

Which should return only records that have a quantity >0 or a priority of A
but it returns all records for the Stock ID

Anyone see where Im going wrong?

Cheers,
Douglas McKenzie

----------------------------------------
Internet Developer / Designer
[EMAIL PROTECTED]
020 7267 6718
----------------------------------------


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to