Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting multiple fields in one column
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01219371
Message ID:
01219545
Vues:
7
>Still having a problem. At about record 14334, I get the error message:
>SQL Execution Error
>Executed SQL Statement
>SELECT CASE IsNumeric(AdNumber)
>WHEN 1 THEN CAST(AdNumber AS Int)
>ELSE 0
>END AS AdNumber FROM TNDL
>Error Source .NET SQLClient Data Provider
>Error Message; SyntaxError converting the varChar
>Value '. ' to a column of the data type int
>
>Could it be that a period passes the IsNumeric test, but fails when it actually is converted to integer?
>
>How could I handle this?

As Cetin mentioned you could use money type to handle periods and/or comma's in the field. If your just going to build this field for use in the order by clause then type should not matter. If you have to have it as Int then you could include two replace functions prior to the cast to strip the periods and comma's out.
Michael McLain
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform