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
Built-In Webcam Stopped Working on Lenovo ThinkPad
Powershell, get-qadcompter
"Invalid Argument provided." Error when Generating PDFs in VB.NET Application via Crystal Reports Viewer
namespace question
Direct X 10.1 vs Direct X 11, Windows XP SP3 vs Windows 7
How to activate OCR fonts on OTC850 Dot Matrix Printer?
PIX 515 to ASA 5505 VPN tunnel problems...
Interpreting Outlook Log File
Blogger loses Google analytics
AJAX post returning 500 Internal Server Error on Live Server