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 > how to copy a db2 table to another db2 table ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-04, 04:04
litty litty is offline
Registered User
 
Join Date: May 2004
Posts: 2
Question how to copy a db2 table to another db2 table ?

hi,
I need to copy the contents of one db2 table to another db2 table...can anyone help me with achieving this..?
thanks in advance,
litty
Reply With Quote
  #2 (permalink)  
Old 05-19-04, 06:55
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Question Os

There are several opportunities, but it depends on
your operating system and version - please post these
and I will give you some options.
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #3 (permalink)  
Old 05-20-04, 00:15
litty litty is offline
Registered User
 
Join Date: May 2004
Posts: 2
ours is OS/390....actually I need to copy the contents of a DB2 table in production into another DB2 Table again in production i.e the same region...then I also need to append some additional data at the end of the DB2 table after the copied data. How do I do this using a DB2 utility...?
Reply With Quote
  #4 (permalink)  
Old 05-20-04, 02:09
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
The easiest way is to use the following SQL statement:

insert into tablea select ... from tableb

Check out the SQL reference manual for details.

You can use the LOAD utility with resume option to add data from a sequential dataset to the table.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 05-20-04, 02:18
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi litty,

Please also see: http://www.dbforums.com/t997890.html

Hope this helps,
Grofaty
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