Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    2

    Question Unanswered: 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

  2. #2
    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

  3. #3
    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...?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Hi litty,

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

    Hope this helps,
    Grofaty

Posting Permissions

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