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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 cast & convert failure varchar to decimal

Author  Topic 

Ma Baker
Starting Member

3 Posts

Posted - 2012-02-09 : 02:47:30
How can I convert a varchar column of amounts to decimal 18,2 when cast and convert fail and isnumeric = 0 is clear of non numeric characters?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-02-09 : 02:55:20
Please show an example.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-09 : 14:28:12
quote:
Originally posted by Ma Baker

How can I convert a varchar column of amounts to decimal 18,2 when cast and convert fail and isnumeric = 0 is clear of non numeric characters?


isnumeric function check will not actually give you records with numeric data only
see this

http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/enhanced-isnumeric-function.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -