Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Angry Unanswered: Copying data between tables

    Hi all,

    I am trying to copy data from one database to another database to an existing table -- (same instance and table names of the source and target are the same). It says table already exists and doesnt copy the data. Please help.

    I am running DB2 8.1.5 on Windows 2000

    Code:

    CONNECT TO DBTEST1 Administrator USING ****;
    EXPORT TO \\DB2WIN2000\C$\PROGRA~1\IBM\SQLLIB\WEBCPTAB.IXF OF IXF MESSAGES \\DB2WIN2000\C$\PROGRA~1\IBM\SQLLIB\WEBCPTAB.EXM SELECT * FROM DBO.TESTDATA;

    CONNECT TO DBTEST2 USER Administrator USING ****;
    IMPORT FROM \\DB2WIN2000\C$\PROGRA~1\IBM\SQLLIB\WEBCPTAB.IXF OF IXF MESSAGES \\DB2WIN2000\C$\PROGRA~1\IBM\SQLLIB\WEBCPTAB.IMM INSERT INTO DPS.TESTDATA;
    CONNECT RESET;


    Thanks in advance.

    Newbie

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Does look correct to me ..

    Can you check the message log and post the full message here?

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Exclamation Sorry!

    The number of columns did not match. That was why i got the error. Thanks.

Posting Permissions

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