Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sambrown180
Starting Member
38 Posts |
Posted - 2008-12-09 : 07:59:02
|
| i am trying to write a query where i can search my product table for a large shirt that coss less than £49.99.I wrote this query but for some reason it is running three and finding some of the wrong records. please can you tell me what is wrong with this queryselect *from Productwhere Product_Name ='Shirt'select *from Productwhere Product_Size ='L'select *from Productwhere Product_Price <='£49.99' |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-12-09 : 08:07:17
|
| I think you just mean this?select *from Productwhere Product_Name ='Shirt' and Product_Size ='L' and Product_Price <='49.99'What is the data type of the price field?Jim |
 |
|
|
soorajtnpki
Posting Yak Master
231 Posts |
Posted - 2008-12-09 : 08:07:20
|
quote: Originally posted by sambrown180 i am trying to write a query where i can search my product table for a large shirt that coss less than £49.99.I wrote this query but for some reason it is running three and finding some of the wrong records. please can you tell me what is wrong with this queryselect *from Productwhere Product_Name ='Shirt'select *from Productwhere Product_Size ='L'select *from Productwhere Product_Price <='£49.99'
Wat u really need by 3 queries.Why cant u make it as one. |
 |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2008-12-09 : 08:07:35
|
| select *from Productwhere Product_Name ='Shirt'and Product_Size ='L'and Product_Price <='£49.99' |
 |
|
|
sambrown180
Starting Member
38 Posts |
Posted - 2008-12-09 : 08:15:00
|
| sorted thanks people |
 |
|
|
|
|
|