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
 General SQL Server Forums
 New to SQL Server Programming
 Problem Converting

Author  Topic 

pecusio
Starting Member

5 Posts

Posted - 2010-02-09 : 13:11:51
Hello,

I'm trying to convert some data from string to float but for some reason it gives me an error, here comes my question is there anyway to detect what is the row that gives me the error?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-09 : 13:15:50
provided you've some non numeric data you can identify them by using ISNUMERIC() function.

like

SELECT stringcolumn
FROM YourTable
WHERE ISNUMERIC(stringcolumn)=0
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-02-10 : 08:15:37
http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/enhanced-isnumeric-function.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-10 : 08:28:03
quote:
Originally posted by madhivanan

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

Madhivanan

Failing to plan is Planning to fail


I think what OP needs is a way to differentiate between alphabetic and numeric data so even the standard isnumeric() function will suffice

------------------------------------------------------------------------------------------------------
SQL Server MVP
Go to Top of Page
   

- Advertisement -