Skip to Content
Former Member
Mar 26, 2009 at 12:52 PM

EXEC SQL - External Database Insert multiple rows



I'm looking for the right syntax to INSERT all the records in an internal table into an external Oracle database table in a single SQL statement. There are no issues with connectivity maintained thru DBCO.

I'm able to connect, retrieve, update, delete and insert records in the external db table.

Currently I'm looping though an internal table and inserting records one by one and this is time consuming

when there are thousands of records.

Would like to insert all the records in the internal table in a single SQL statement without having to

loop through the internal table.

Have been trying with the following statement but no luck so far:

INSERT INTO <ext.table> (fieldA, fieldB, fieldC)

SELECT sapfldA, sapfldB, sapfldC

FROM TABLE <sap.table>