-
Junior Member
How can I get records in follwing format?
suppose in table named customer has a column named ename having values like james,john
,suji_paric,scott_tiger.
i want retrieve the column value like
james
john
suji
scott
-
Expert Member
Re: How can I get records in follwing format?
Use the following statement
SQL> select substr(name,1,decode(instr(name,'_'),0,length(name),instr(name,'_')-1))
from test_data;
SUBSTR(NAME,1,DECODE
--------------------
james
john
suji
scott
-
Contributing Member
Re: How can I get records in follwing format?
there r many ways 2 do this
http://asktom.oracle.com/pls/asktom/...D:766825833740
or search google pivot query
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules