|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Passthru function for Update/Insert with dynamic/multiple DB |
« View previous topic :: View next topic » |
Author |
Message
|
wmb_wps_soa |
Posted: Sun Feb 02, 2014 2:53 pm Post subject: Passthru function for Update/Insert with dynamic/multiple DB |
|
|
Acolyte
Joined: 19 Feb 2010 Posts: 65 Location: Detroit,Michigan,USA.
|
Hi Guys,
I am having an issue using Passthru function as I want to use it with dynamic DSN to use two different SQL database operations in the same compute node, but it is not working and I could not find any example/syntax for Passthru update/insert with dynamic DSN.
Passthru SELECT works fine with dynamic DSN:
PASSTHRU('SELECT consumers.* from wty.Consumers AS consumers WHERE consumers.CONSID= ? AND consumers.CONSCITY= ?' TO Database.PTLDB VALUES('123456','NEWYORK'));
I would really appreciate helping on this.
Thanks
SJ |
|
Back to top |
|
 |
dogorsy |
Posted: Mon Feb 03, 2014 12:30 am Post subject: Re: Passthru function for Update/Insert with dynamic/multipl |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
wmb_wps_soa wrote: |
Hi Guys,
I am having an issue using Passthru function as I want to use it with dynamic DSN to use two different SQL database operations in the same compute node, but it is not working and I could not find any example/syntax for Passthru update/insert with dynamic DSN.
Passthru SELECT works fine with dynamic DSN:
PASSTHRU('SELECT consumers.* from wty.Consumers AS consumers WHERE consumers.CONSID= ? AND consumers.CONSCITY= ?' TO Database.PTLDB VALUES('123456','NEWYORK'));
I would really appreciate helping on this.
Thanks
SJ |
PASSTHRU 'INSERT INTO acciones (empresa, precio) values( ?, ? )'
TO Database.MYDB
values ('EFGHI', 6014);
I have never done a Passthru UPDATE but it is probably very similar to the INSERT, something like
PASSTHRU 'UPDATE acciones SET price = ? WHERE your clause here' TO Database.MYDB values(12345); |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|