Microsoft
Software
Hardware
Network
Question : How to make the query with random characters?
Have a table A (ID varchar2(5)) and a list of words: ABC, VBD, DBC.
A
---------
23453
34567
76541
67862
....
Want to get the result like:
23453 DBC
34567
76541 ABC
67862 VBD
That is when the last digit is 1, get the 1st word ie ABC, when 2, get 2nd word VBD, and when 3, get DBC. The rest is NULL.
Related Solutions:
How to write sql statement s involve two tables in order?
Answer : How to make the query with random characters?
Hi,
You can try this query.
1: 2:
SELECT id, DECODE(TO_NUMBER(substr(id,-1)), 1, 'ABC', 2, 'VBD', 3, 'DBC', NULL) FROM a
Random Solutions
I need assistance with a SQL query
How to scroll Microsoft Web Brwoser ActiveX contorl in MFC
HP procurve Core switch vs standard layer 3 switch
Mac OS X 10.6.3 Can't logon to Active directory
Please explain me this javascript example about the DOM
Brightstor 12.5 Exchange Agent issue
Setting up DNS records for a small business with a new domain
window 7 OS: blank (black) screen only, as it logs in
How do display number as KB, MB, or GB?
adding static IP addresses onto a network. anything I should take into account?