Microsoft
Software
Hardware
Network
Question : SQL Substr Order
I have a select statement that uses substr
select distinct substr(value, 1, 1) from table
This query returns letters (i.,e, H, O, B, D).
I need those letters to be sorted alphabetically (B, D, H, O).
How can I do this with this query. I tried adding "sort by value" and "order by value". I got an SQL error for both.
Using Oracle 10g.
Answer : SQL Substr Order
select distinct substr(value, 1, 1) from table
order by 1;
or give it an alias
select distinct substr(value, 1, 1) letter from table
order by letter;
Random Solutions
Laptop video not displaying
compareTo() - JavaScript example needed
MS Access 2007 Login Form
Email sent to Tiscali email addresses bouncing with No PTR record error
Can I set up a domain workstation offline?
Firebox X500 - Where to start....
CSS problem
Can't open to a specified PDF page in IE 8
Fading in/out a popup Window in Flex 4.0
visual studio 2010 not automatically rebuild