Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ordering on numeric value of a text field
Message
From
06/01/2013 03:43:10
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Ordering on numeric value of a text field
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01561537
Message ID:
01561537
Views:
76
I have some fields in a table which contain numeric values but are defined as Char(3). So, in some SQLs, we have this ORDER BY Field1, Field2. Is there an easy way to obtain the order by as per the numeric value instead of their textual values? The problem is that values such as 1, 10, 11 which appear before 2, 3 instead of 1, 2, 3, 10, 11.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform