Author |
Message
|
koustubhk_007 |
Posted: Thu Feb 12, 2009 7:26 am Post subject: Update Statement in ESQL in Message Broker |
|
|
Newbie
Joined: 21 Jan 2009 Posts: 4
|
Hi All,
I am new to Message Broker and ESQL, facing problem for updating the records in the Database. Please reply with sintaxt for UPDATE STATEMENT in Message Broker ESQL please..... |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 12, 2009 7:32 am Post subject: Re: Update Statement in ESQL in Message Broker |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
koustubhk_007 wrote: |
Please reply with sintaxt for UPDATE STATEMENT in Message Broker ESQL please..... |
You could save yourself a lot of time looking this up yourself:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ak05160_.htm?
Or if you've already found this and are "facing problem", you could save yourself a lot of time telling us that and then explaining your problem. Which we might know the answer to.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 12, 2009 7:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Moved to correct section _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu Feb 12, 2009 10:33 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
would you mind to place the update statement/query over here,
Just want to see that, matter of curiosity,
some time you may have to use PASSTHRU function for executing the query. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
koustubhk_007 |
Posted: Thu Feb 12, 2009 9:10 pm Post subject: |
|
|
Newbie
Joined: 21 Jan 2009 Posts: 4
|
I am DOING -
UPDATE DATABASE.DB2ADMIN.INWARD_TRN AS INTRN SET INTRN.STATUS.LKP.ID=3 WHERE INTRN.INW_TRN_ID=2
Its giving syntax error.Valid option include identifier.
reply with the exact statement for the esql.
 |
|
Back to top |
|
 |
stallin |
Posted: Thu Feb 12, 2009 9:38 pm Post subject: |
|
|
Novice
Joined: 11 Jan 2009 Posts: 21
|
I am not sure why your statement should throw syntax, did you close the statemnet with ";"
This should work
PASSTHRU ('UPDATE INWARD_TRN SET INTRN.STATUS.LKP.ID=? WHERE INTRN.INW_TRN_ID=?',3,2);
*Give your datasource property correctly
Thanks,
Stallin Vinoth |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Feb 12, 2009 10:23 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
stallin wrote: |
"
This should work
PASSTHRU ('UPDATE INWARD_TRN SET INTRN.STATUS.LKP.ID=? WHERE INTRN.INW_TRN_ID=?',3,2);
|
Your example seems to be missing the schema name.
Perhaps
Code: |
PASSTHRU ('UPDATE DB2ADMIN.INWARD_TRN SET INTRN.STATUS.LKP.ID=? WHERE INTRN.INW_TRN_ID=?',3,2); |
will work? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
capistrano |
Posted: Thu Feb 19, 2009 5:52 am Post subject: |
|
|
 Novice
Joined: 28 Jun 2005 Posts: 13 Location: Dublin
|
koustubhk_007 wrote: |
UPDATE DATABASE.DB2ADMIN.INWARD_TRN AS INTRN SET INTRN.STATUS.LKP.ID=3 WHERE INTRN.INW_TRN_ID=2
|
First of all, is "STATUS.LKP.ID" really a column name?
I have found that you cannot use the table alias in the SET part of the update.
So try the following:
UPDATE DATABASE.DB2ADMIN.INWARD_TRN AS INTRN SET "STATUS.LKP.ID"=3 WHERE INTRN.INW_TRN_ID=2; |
|
Back to top |
|
 |
|