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
C# WMI query for getting current logged on user doesn't work on Windows 7
OCS 2007 R2
Cisco ASA 5505 Remote Access VPN Problem
get wrong autodiscover server in warning message....
Advanced Facebook Fan Page Formatting
Service Tag
help calling javascript function
batch file to write network delay into textfile
Can I use a sql query file (.sql) with bcp.exe?
bootable usb