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 |
|
Ambikaa
Starting Member
43 Posts |
Posted - 2008-08-06 : 08:42:40
|
| Hi,thanks.I am getting this while using this querySyntax error converting the varchar value '$12000' to a column of data type int.SELECT prty_id, prty_genid,StateId,City,prty_Type,prty_SqrFootage,Prty_NoOfBedRooms,prty_NoOfBathRooms,prty_Price,prty_status FavStatus FROM tbl_Property WHERE (cast(prty_Price as int) >= 10000AND cast(prty_Price as int) <= 60000) AND prty_Deleted=0 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-06 : 08:45:30
|
| Why did you store formatted values in the table?Instead of cast(prty_Price as int), use cast(replace(prty_Price,'$','') as int)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|