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 » Update Statement in ESQL in Message Broker

Post new topic  Reply to topic
 Update Statement in ESQL in Message Broker « View previous topic :: View next topic » 
Author Message
koustubhk_007
PostPosted: Thu Feb 12, 2009 7:26 am    Post subject: Update Statement in ESQL in Message Broker Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Feb 12, 2009 7:32 am    Post subject: Re: Update Statement in ESQL in Message Broker Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Feb 12, 2009 7:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Gaya3
PostPosted: Thu Feb 12, 2009 10:33 am    Post subject: Reply with quote

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
View user's profile Send private message
koustubhk_007
PostPosted: Thu Feb 12, 2009 9:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
stallin
PostPosted: Thu Feb 12, 2009 9:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Thu Feb 12, 2009 10:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
capistrano
PostPosted: Thu Feb 19, 2009 5:52 am    Post subject: Reply with quote

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
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 » Update Statement in ESQL in Message Broker
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.