Posted: Wed Nov 09, 2011 6:09 am Post subject: Multiple row insert into DB using PASSTHRU
Centurion
Joined: 15 Apr 2011 Posts: 139 Location: Chennai, India
Hi,
I need to insert multiple rows into DB using a single passthru(or any other means) statement, that is using a single DB call. I will save all the rows into a ROW datatype and then use that in the passthru statement.
Is that possible to implement this way? I just tried the following passthru statement but failed.
SET PAX_ROW.ROW[1].col1 = '1a';
SET PAX_ROW.ROW[1].col2 = '1b';
SET PAX_ROW.ROW[1].col3 = '1c';
SET PAX_ROW.ROW[2].col1 = '2a';
SET PAX_ROW.ROW[2].col2 = '2b';
SET PAX_ROW.ROW[2].col3 = '2c';
DECLARE SS CHARACTER PASSTHRU('INSERT INTO PAX_TBL(col1,col2,col3)VALUES(?)' TO Database.{'DSN'} VALUES(select * from PAX_ROW.ROW));
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum