order by LEN(value), value
Not perfect, but works well in a lot of cases.
Related Contents:
- SQL Server GUID sort algorithm. Why?
- T-SQL: Opposite to string concatenation – how to split string into multiple records [duplicate]
- What is the best way to create and populate a numbers table?
- SQL Server IN vs. EXISTS Performance
- How do I fix the error ‘Named Pipes Provider, error 40 – Could not open a connection to’ SQL Server’?
- Sql Server string to date conversion
- Insert multiple rows WITHOUT repeating the “INSERT INTO …” part of the statement?
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- Parameter Sniffing (or Spoofing) in SQL Server
- Simulation of CONNECT BY PRIOR of Oracle in SQL Server
- What are the main performance differences between varchar and nvarchar SQL Server data types?
- SQL Server query to find all permissions/access for all users in a database
- Datatype for storing ip address in SQL Server
- How to change identity column values programmatically?
- Cannot truncate table because it is being referenced by a FOREIGN KEY constraint?
- How much size “Null” value takes in SQL Server
- What is the maximum characters for the NVARCHAR(MAX)? [duplicate]
- Using a sort order column in a database table
- Why is it considered bad practice to use cursors in SQL Server?
- CAST and IsNumeric
- Atomic UPSERT in SQL Server 2005
- How to create the linked server for SQL Server 2008 where we have the database from 2000 and 2005
- SQL Server sp_msforeachtable usage to select only those tables which meet some condition
- How do you kill all current connections to a SQL Server 2005 database?
- SQL Server ORDER BY date and nulls last
- SQL Server pivot vs. multiple join
- SQL Query to find the last day of the month
- Why use the INCLUDE clause when creating an index?
- Creating audit triggers in SQL Server
- SQL Server, convert a named instance to default instance?
- Regular Expressions in SQL Server servers?
- How do you specify a different port number in SQL Management Studio?
- How to determine total number of open/active connections in ms sql server 2005
- Decimal values in SQL for dividing results
- Find non-ASCII characters in varchar columns using SQL Server
- How to query values from xml nodes?
- SQL Server recursive query
- Check if a temporary table exists and delete if it exists before creating a temporary table
- SQL Server error on update command – “A severe error occurred on the current command”
- Check if a string contains a substring in SQL Server 2005, using a stored procedure
- How to query for Xml values and attributes from table in SQL Server?
- Unable to begin a distributed transaction
- Violation of UNIQUE KEY constraint on INSERT WHERE COUNT(*) = 0 on SQL Server 2005
- Aggregate bitwise-OR in a subquery
- What happens to the primary key Id when it goes over the limit?
- What is the point of “Initial Catalog” in a SQL Server connection string?
- SQL server schema and default schema
- Milliseconds wrong when converting from XML to SQL Server datetime
- nvarchar(max) vs NText
- How to store directory / hierarchy / tree structure in the database?