Hi
I have an SQL statement:
SELECT Product.ProductImage, Product.ProductName, Product.BasicSpecs, Product.UnitPriceSGD, Product.UnitPriceUS
FROM Product INNER JOIN
GeneralFeatures ON Product.ProductID = GeneralFeatures.ProductID INNER JOIN
EntertainmentFeatures ON Product.ProductID = EntertainmentFeatures.ProductID
WHERE (Product.ConnectivityOptions IN ('GPRS'))
This statement should return me results because i know are columns which consists GPRS. In fact most of them consist GPRS in the ConnectivityOptions column in my Product Table.
If my ConnectivityOptions column consists of 'GPRS, WAP, Bluetooth' or 'GPRS, WAP' or 'GPRS, WAP, Bluetooth, USB, EDGE' etc, it should return me as a result according to my SQL statement above right? But my SQL statement does not return me any results =(.
But if i use the SQL statement:
SELECT Product.ProductImage, Product.ProductName, Product.BasicSpecs, Product.UnitPriceSGD, Product.UnitPriceUS
FROM Product INNER JOIN
GeneralFeatures ON Product.ProductID = GeneralFeatures.ProductID INNER JOIN
EntertainmentFeatures ON Product.ProductID = EntertainmentFeatures.ProductID
WHERE (Product.ProductName LIKE '%Nokia%') AND (GeneralFeatures.FormFactor LIKE '%Candy Bar%') AND (GeneralFeatures.PhoneType LIKE '%Triband%')
It returns me some result. And when i add the statement
AND (Product.ConnectivityOptions IN ('GPRS')), it totally does not return me any results. Meaning, the SQL statement would be like
SELECT Product.ProductImage, Product.ProductName, Product.BasicSpecs, Product.UnitPriceSGD, Product.UnitPriceUS
FROM Product INNER JOIN
GeneralFeatures ON Product.ProductID = GeneralFeatures.ProductID INNER JOIN
EntertainmentFeatures ON Product.ProductID = EntertainmentFeatures.ProductID
WHERE (Product.ProductName LIKE '%Nokia%') AND (GeneralFeatures.FormFactor LIKE '%Candy Bar%') AND (GeneralFeatures.PhoneType LIKE '%Triband%')
AND (Product.ConnectivityOptions IN ('GPRS'))
I think this statement: (Product.ConnectivityOptions IN ('GPRS')) has some problem. But i couldn't figure out what it is. Or i have used the wrong clause? Instead of IN clause, which other clauses can i still use? I want to list all the mobile phones that consists of GPRS, in this case...
What should i do? How should i modify my code?
Thanks!