Results 1 to 3 of 3

Thread: Requirement

  1. #1
    Join Date
    Mar 2012
    Posts
    6

    Unanswered: Requirement

    Hi I have the requirement as bellow,

    I have a table column with char(16) initially master table , now it is splited into char(10) and char(6) in other tables,
    Now i wanted to insert the data from char(16) into tow fields one as char(10) and another as char(6),please let me know how to do this

    Please let me know how can i divide it into two fileds with select statement using db2.....

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You could use the SUBSTR() function, for example.

  3. #3
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963

    Talking

    You can do like this:

    Code:
    Insert into table2 (..., split1, split2,...)
    select ..., Left(columnX, 10), strip(Right(columnX, 6)),... 
    from table1
    ;;;;
    Lenny

Posting Permissions

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