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
Sharepoint Webpart page load event issue
AJAX Refresh on Submit of Pop Up Window
HELP! Windows SBS 2008 server keeps hanging URGENT!
Filling a TextBox on a Form with Data from a Field from an SQL Database Table in Visual Studio 2008
GridView control scroll bars are not visible on page reload
How can I convert a custom control that calls User32 and Shell32 to work on Mono?
how can i find all ILO boards on a network
Excel Date Time format conversion yyyy-mmm-dd hh:mm:ss to mm/dd/yyyy hh:mm:ss
I can send e-mail ok but cannot get to Internet via browser
dynamic popup with checklistbox using ajax control toolkit