Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Bulk Insert using Native SQL or CL_SQL_PREPARED_STATEMENT

Former Member
0 Likes
989

ABAP Open SQL provides the ability to insert multiple rows into a SAP database table using a single SQL statement : INSERT....FROM TABLE...The major advantage of this is performance.

Is there a similar function for Native SQL? Or by using the ADBC functions(OO methods)?

We need to do a mass insert of an internal table into a non-SAP table that exists in an external Oracle database. Inserting one row at a time is causing a major performance issue. I am currently using class CL_SQL_PREPARED_STATEMENT to perform one insert per row in an internal table, but now require the ability to do mass inserts.

Any help would be much appreciated

3 REPLIES 3
Read only

Former Member
0 Likes
665

This really isn't a native SQL question. Native SQL simply allows you to enter directly an SQL command that is specific to your database. Since your database is Oracle, I suggest you find an Oracle forum and ask it there.

Rob

Read only

Former Member
0 Likes
665

Thanks for your reply, but I disagree that it's not a native SQL question.

The crux of the problem is the ability to use an internal table in a native SQL statement.

If anyone could provide information on how to you would execute a mass insert into a remote database using Native SQL or the CL_SQL* classes, please let me know.

Read only

0 Likes
665

OK - on the surface it is a native SQL question, but you are basically asking how to create an interface between ABAP and Oracle. That interface is ABAP open SQL.

I know this isn't the answer you want. If you'd like, I can move this thread to the forum. Some of the people who monitor that know a lot more about databases than I do.

Rob