If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Copying data between tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-04, 14:40
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Angry 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
Reply With Quote
  #2 (permalink)  
Old 05-13-04, 15:52
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #3 (permalink)  
Old 05-13-04, 17:04
dsusendran dsusendran is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On