Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transferring character field into numeric field
Message
 
 
À
22/10/2012 08:31:05
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01555436
Message ID:
01555437
Vues:
69
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform