Results 1 to 3 of 3

Thread: Transform data

  1. #1
    Join Date
    Jan 2004
    Posts
    153

    Unanswered: Transform data

    Hi All,

    Need to transfer data from one table to another.

    The source table has got only one column named ‘Student_Name’ with the below data:

    SUSAN WILKINSON
    ACTION JACKSION
    KABIR
    RAMOS KRAZ PAUL

    These data needs to transfer into another table where it got two columns for this. Columns are ‘Student_ F_Name’ and ‘Student_L_Name’ and data will be as follows:

    Student_ F_Name Student_L_Name

    SUSAN WILKINSON
    ACTION JACKSION
    KABIR
    RAMOS KRAZ PAUL


    Thanks
    JD

  2. #2
    Join Date
    Jan 2004
    Posts
    153
    Quote Originally Posted by jayanta_deb View Post
    Hi All,

    Need to transfer data from one table to another.

    The source table has got only one column named ‘Student_Name’ with the below data:

    SUSAN WILKINSON
    ACTION JACKSION
    KABIR
    RAMOS KRAZ PAUL

    These data needs to transfer into another table where it got two columns for this. Columns are ‘Student_ F_Name’ and ‘Student_L_Name’ and data will be as follows:

    Student_ F_Name Student_L_Name

    SUSAN WILKINSON
    ACTION JACKSION
    KABIR
    RAMOS KRAZ PAUL


    Thanks
    JD

    select student_name
    ,decode(instr(student_name,' ',-1),0,substr(student_name,1),SUBSTR(student_NAME,1, (INSTR(student_NAME,' ',-1)-1))) Student_F_NM
    ,decode(instr(student_name,' ',-1),0,null,SUBSTR(student_NAME,(INSTR(student_NAME, ' ',-1))+1)) Student_L_NM
    from student_tab

  3. #3
    Join Date
    Jan 2004
    Posts
    153
    thanks I solved the same.

Posting Permissions

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