Prepare for your Next Interview
This is a discussion on How can I get records in follwing format? within the SQL forums, part of the Databases category; 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...
|
|||
|
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 |
| Sponsored Links |
|
|||
|
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 |
|
|||
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pls let me know the answers for follwing lr questions | vsmkreddy | LoadRunner | 1 | 05-16-2008 08:29 AM |
| Report output Format to pdf format | krishnaindia2007 | Oracle | 2 | 02-05-2008 03:49 AM |
| Currency Format | krishnaindia2007 | Oracle | 1 | 12-27-2007 02:46 AM |
| Format of Sysdate | Geek_Guest | Oracle | 5 | 07-12-2007 06:04 AM |
| How can I display the records in specific format | anandreddy.bv | SQL | 1 | 05-30-2007 05:50 AM |