Re: Copying Table contents to another table?

Steven Blank

Here's a much easier way:

Make the SOURCE table your batch program's Main table; select all of the columns.

Add a Link Create operation for the TARGET table and do not specify an index number in this Link operation; select all of the columns.

In the Record Suffix, Update each of the TARGET table's columns with the appropriate column from the SOURCE table.

Execute the program.

Steve Blank

P.S. Depending on the backend DBMS, there may be another, more efficient technique and/or tweaks you can make to improve performance.

At 02:46 PM 7/16/2017, you wrote:
I have 2 tables with identical structures and indexes. I want to copy the content of the 1st table to a totally blank 2nd table. So far I am doing this using export/import since that was the method taught to me in school but I want to ask if there is another way to do this via batch programs?


Join to automatically receive all group messages.