I have the following statement that apparently is incorrect...
SELECT * FROM dbo.products WHERE (CategoryID LIKE '%') AND (ProductName LIKE '%%') AND ((CategoryID <> '') OR (CategoryID = '1 ')) ORDER BY ProductName
Basically I want to select all from the products table, where CategoryID contains % and ProdunctName contains %. IN addition to this the CategoryID should be not equal to nothing, or should be 1. I thought the brackets in the above statement would convey this. ANyone actually understand what I'm on about???
G -GTM Solutions, Home of USITE-
-=
SELECT * FROM dbo.products WHERE (CategoryID LIKE '%') AND (ProductName LIKE '%%') AND ((CategoryID <> '') OR (CategoryID = '1 ')) ORDER BY ProductName
Basically I want to select all from the products table, where CategoryID contains % and ProdunctName contains %. IN addition to this the CategoryID should be not equal to nothing, or should be 1. I thought the brackets in the above statement would convey this. ANyone actually understand what I'm on about???
G -GTM Solutions, Home of USITE-
-=