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 » retrieve data from database

Post new topic  Reply to topic
 retrieve data from database « View previous topic :: View next topic » 
Author Message
rkford11
PostPosted: Thu Oct 07, 2004 11:38 am    Post subject: retrieve data from database Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

i am trying to retrieve data from the database using the following statement.

SET OutputRoot.XML.MESSAGE.CK = SELECT COL_1 FROM Database.SCHEMA.TABLE WHERE COL_2 = InputRoot.XML.MESSAGE.CB

please let me know where i am making the mistake.
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Thu Oct 07, 2004 11:47 am    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

I think ur missing the Keyword.. 'THE'




-sanu
Back to top
View user's profile Send private message
rkford11
PostPosted: Thu Oct 07, 2004 11:58 am    Post subject: Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

sanu_newbie wrote:
I think ur missing the Keyword.. 'THE'




-sanu


Even though i put the key word THE i am not able to retrieve it.

Thanks
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Thu Oct 07, 2004 12:02 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

what error r u getting....any SQLCODE...

can u post ur exact ESQL???



-sanu
Back to top
View user's profile Send private message
JT
PostPosted: Thu Oct 07, 2004 12:21 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Give this a try:

SET OutputRoot.XML.MESSAGE.CK[] = SELECT T.COL_1 FROM Database.SCHEMA.TABLE AS T WHERE T.COL_2 = InputRoot.XML.MESSAGE.CB;
Back to top
View user's profile Send private message
rkford11
PostPosted: Thu Oct 07, 2004 1:56 pm    Post subject: Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

sanu_newbie wrote:
what error r u getting....any SQLCODE...

can u post ur exact ESQL???



-sanu

This is the error.

BIP2432E: (ABC_Compute.CopyEntireMessage, 3.45) : The correlation name 'COL_1' is not valid. Those in scope are: , Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, TABLE.

The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.

Correct the syntax of the expression and redeploy the message flow.
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Thu Oct 07, 2004 2:13 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

okie....

r u just..trying with this

Code:
 SELECT COL_1 FROM Database.SCHEMA.TABLE


like here COL_1 shud be a reference. there so I was asking ur ESQL code, but anyways...

try this...
Code:
THE(SELECT DB.COL_1 FROM Database.SCHEMA.TABLE AS DB)


if ur still facing the pblm..... post ur ESQL


-sanu
Back to top
View user's profile Send private message
JT
PostPosted: Thu Oct 07, 2004 6:22 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Oops, forgot the parens:

SET OutputRoot.XML.MESSAGE.CK[] = (SELECT T.COL_1 FROM Database.SCHEMA.TABLE AS T WHERE T.COL_2 = InputRoot.XML.MESSAGE.CB);
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 » retrieve data from database
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.