Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    2

    Unanswered: Import from ixf file in Table which have more columns

    I would like to import data from ixf file into a table which have 2 more columns.
    Is any db2 statement which make possible to import data from ixf file into the table which has two more columns and update 2 other columns with particular value ?

    Thanks
    Ross

  2. #2
    Join Date
    Mar 2003
    Posts
    280
    Quote Originally Posted by rshehu View Post
    I would like to import data from ixf file into a table which have 2 more columns.
    Is any db2 statement which make possible to import data from ixf file into the table which has two more columns and update 2 other columns with particular value ?

    Thanks
    Ross
    As far as I know you cannot do this in one step. You can import the data like:

    import from f.ixf of ixf insert into T (c1, c2)

    Note that you need to drop any not null constraints for remaining columns. Then update, and restore constraints that where dropped.

    Another option, import data to temp table and do a merge from there.

    If you have access to the export process you can add the "missing" columns there.


    /Lennart

  3. #3
    Join Date
    Mar 2012
    Posts
    2

    Import from ixf file in Table which have more columns

    Hi Lennart,

    I was having the same idea but I thought I might be able to import from .ixf file and in the same time to add two more columns in the table.
    I was having problems when I imported to a copy temporal table because of NULL constraint.
    In this temporal Table I can remove this constrain.
    Thanks!!
    Ross

Posting Permissions

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