‎2016 Nov 18 10:54 AM
Hello,
I have two tables in SAP (DB2 database). Table 1 contains 100 fields. Table 2 contains all the fields from Table 1 except 10 fields.
I need to do a straight copy from Table 1 to Table 2 for corresponding fields. I need to copy around 1 billion records. What is the best way to do so. I don't need to read the data in ABAP layer.
Thanks in advance
‎2016 Nov 18 1:02 PM
You should post also in a DB2 forum, for native SQL statements like
INSERT INTO YOURLIB.TARGET
(FIELD1, FIELD2, FIELD3, ... FIELD90)
SELECT FIELD1, FIELD2, FIELD3, ... FIELD90
FROM YOURLIB.SOURCE(or create some view on the bigger table with fields of the smaller one to use in the SELECT part)
Else, in Abap, look in forum for samples of parallelization or cursor, calling for insert of batches of records in another task, there are already many samples.
Regards,
Raymond
‎2016 Nov 18 1:02 PM
You should post also in a DB2 forum, for native SQL statements like
INSERT INTO YOURLIB.TARGET
(FIELD1, FIELD2, FIELD3, ... FIELD90)
SELECT FIELD1, FIELD2, FIELD3, ... FIELD90
FROM YOURLIB.SOURCE(or create some view on the bigger table with fields of the smaller one to use in the SELECT part)
Else, in Abap, look in forum for samples of parallelization or cursor, calling for insert of batches of records in another task, there are already many samples.
Regards,
Raymond