Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transferring character field into numeric field
Message
 
 
To
22/10/2012 08:31:05
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01555436
Message ID:
01555437
Views:
70
This message has been marked as the solution to the initial question of the thread.
>I am doing an insert from a table into another. However, in the new table, a field is numeric and in the other table it is character. The initial table should have only numeric values in the field. However, because it is character and because there was a problem once in a specific set of records, I can see there are character values in that field. Is there a way, when doing the insert command to specify to convert the character value into a numeric value so to avoid the error when trying to import those records when it reaches them?

You can add
WHERE ISNUMERIC(MyColumn) = 1
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform