Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    36

    Unanswered: Loading data into tables with new columns added in between.

    Hi All,

    I have some tables with the data. I need to add 4 to 8 columns in between to each table. All these table consists of data. Not much data but has some data and I need to export all the data from all the fileds from the inital structure of the table and then drop the table and recreate with adding the new columns in middle and then again load the data exported from the initial table to their repective columns..

    I have exported the data in the following formats

    db2 "export to xxx.del of del select * from schema.tabname"
    db2 "export to xxx.csv of del select * from schema.tabname"
    db2 "export to xxx.del of del select col1,col2,col3... from schema.tabname"
    db2 "export to xxx.csv of del select col1,col2,col3... from schema.tabname"

    can anyone please help me now, how to load this exported data into table with newly added columns. all added columns are nullable.

    Or can anyone suggest me the best method or approach to do this task...

    Thanks for ur help in advance..

    DB2 Version: 9.5

    OS Level : AIX 5.3

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Why do you think you need to add columns _in the middle_?

    Anyway, check the METHOD option of the load command - it allows you to indicate the mapping between the input data and the table columns.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by n_i
    Why do you think you need to add columns _in the middle_?
    Didn't you see his handle name?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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