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
can i setup an application on a server without joining to a domain first?
Problem getting page with CURL and PHP
Which KEY do I use for my KMS Server and clients?
phpmailer errorInfo
asp.net: how would you insert the address 'location' into this hyperlink control
How to remove new line from a string
Iphone sync to Exchange 2007
Blackberry Enterprise Express on Exchange 2007 Can't resolve name during MAPI Profile Setup
Security Alert when Opening Outlook
What causes error "0x80070015" when connecting to bluetooth device in window 7?