ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Multiple row insert into DB using PASSTHRU

Post new topic  Reply to topic
 Multiple row insert into DB using PASSTHRU « View previous topic :: View next topic » 
Author Message
Inforz
PostPosted: Wed Nov 09, 2011 6:09 am    Post subject: Multiple row insert into DB using PASSTHRU Reply with quote

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));

Any solutions would be appreciated.

Thanks,
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 09, 2011 6:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I think you will find that
Code:
SELECT * from PAX_ROW.ROW
does not produce what you expect it to produce.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Multiple row insert into DB using PASSTHRU
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.