Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting multiple fields in one column
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01219371
Message ID:
01219545
Views:
6
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform