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
Dynamically Change .XSD File Location in Crystal Reports Using ASP.NET 2.0
Stored Procedure not working in Crystal
'guid' is null or not an object in Jquery
In .NET, how can I add to a variable value to a query result using LINQ to SQL?
error while installing Exchang 2010
Having a problem seeing USB devices after installing libusb - NO KEYBOARD OR MOUSE !!
Can't print to Dymo Labelwriter 400 turbo after adding labelwriter 450 turbo drivers on windows 2003 terminal server
What is the best Server Antivirus going right now? What are you guys using?
How deploy a website shortcut to 200 users desktop
The marquee progressbar hangs as the next line of the code executes