Results 1 to 3 of 3

Thread: How can I get records in follwing format?

  1. #1

    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


  2. #2
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    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


  3. #3
    Contributing Member
    Join Date
    Apr 2006
    Answers
    46

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact