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
Deploying SharePoint project to Production Server
How do I link combo boxes to select query in a form?
Need to create a process that will install .exe on clients pc/servers in asp.net
Cannot pull Data from Oracle using SSIS
Including fields in Filemaker email
Outlook 2003 on terminal servers
Retain selected value from dynamic drop down php
Split varchar MS SQL
refresh ribbon any time a worksheet is activated
C#.NET authenticate computer account against Active Directory