Sorting nvarchar column SQL Server 2005 -


when sorting nvarchar column in sql has numeric value, sql server returns bad sorting , don't know why!

is there particular way sql server sorts varchar columns having numeric values?

thanks

this has fail-safe take account non numerical values, , place them @ end of result set.

select [nvarcharcolumn] [table] order cast(isnull(nullif(isnumeric([nvarcharcolumn]),0),2147483647) int) 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -