Sorting strings in Alphanumeric order
Is there a way to sort a string column in ascending order with aplha first and then numeric(Dictionary order).
If the column productid has values A100,2030,B223 and 1002,
the sort order must be
Normal ascending order in SQl query gives sorting as 1002, 2030, A100 and B223.
Use "ALTER SESSION SET NLS_SORT = ...." to set the linguistic sorting order. By default it is set to BINARY which colates the digits before the alpha characters.
You can use "ALTER SESSION SET NLS_SORT = WEST_EUROPEAN" (as an example) to get alpha characters listed before the numeric characters.
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Click Here to Expand Forum to Full Width