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 |
|
mapperkids
Yak Posting Veteran
50 Posts |
Posted - 2007-04-10 : 14:15:09
|
| In a table, I have one varchar field which is contain dollar values what I did is use the convert function in the select statementSelect * from TABLEA where CONVERT(money, VALUE_FIELD) > 1000The problem is there are some record contain data is not valid for convertion, most likely is not number, so it give me errors during the convertion. Is there any way I can find out exactly which records cause problem, so I can fix it manually.Thanks! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-10 : 14:22:14
|
| You can use the IsNumeric function to determine which ones are causing the conversion problems. Check out IsNumeric in BOL for more information.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-11 : 09:07:28
|
| 1 Make sure you use proper datatype2 Do currency formations at front end (If you use it)3 ISNUMERIC is not always realiablehttp://aspfaq.com/show.asp?id=23904 One of the methods isWhere col not like '%[^0-9]%'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|