Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    64

    Unanswered: spliting column values based on space

    Hi

    I have a column t1 in table with varchar2(50);

    T1
    Ani Hath
    Amber Cr
    John Mojo
    Andy Green

    I have to split the column values based on the space.

    so that Ani , Amber , John and Andy comes in one column and Hath,Cr,Mojo and Green comes into second.

    please advice !!!

    Thanks!!

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Use SUBSTR and INSTR functions to separate those values.

  3. #3
    Join Date
    Jan 2010
    Posts
    64
    SUBSTR(t1,1,INSTR(t1,',',1) -1) it gives me the first part like Ani Amber etc.

    Not able to figure out how to get the second part i.e Hath,Cr,Mojo etc .

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Think harder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •