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 » Database Node

Post new topic  Reply to topic
 Database Node « View previous topic :: View next topic » 
Author Message
Jithesh shetty
PostPosted: Mon Nov 26, 2007 10:36 pm    Post subject: Database Node Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

hi,

how to store the Output of select query value into an variable.

select V.ERROR_DETAIL_SEQ from Database.VMI_ERROR_DETAILS AS V where V.RECORD_INSERTED_TIME = '13:34:07';


please anyone help me in this........
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Nov 26, 2007 10:43 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Jithesh shetty,

Doesn't SET variable work ?

Regards.
Back to top
View user's profile Send private message Send e-mail
Jithesh shetty
PostPosted: Mon Nov 26, 2007 10:55 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

i used follwoing ESQL query.....

SET DOCUMENTID = Root.MRM.VMI.DOCUMENTID;

SET Val = THE(select V.ERROR_DETAIL_SEQ from Database.VMI_ERROR_DETAILS AS V where V.RECORD_INSERTED_TIME = '13:34:07');

SET Val = Val + 1;

INSERT INTO Database.VMI_ERROR_DETAILS(ERROR_DETAIL_SEQ, RECORD_INSERTED_DATE, RECORD_INSERTED_TIME, SERVICE_ID, DOCUMENT_ID, SRC_MSG_REF, TGT_MSG_REF, GEN_ERROR_CODE, SYS_ERROR_CODE, ERROR_TXT, INPUT_MSG, RESUB_DOC_NAME, RESUB_FLOW_NAME, RESUB_COUNT, ERROR_RESOLUTION_PRIORITY, ACTION_TAKEN_FLAG, RESOLUTION_COMPLETE, RESUBMIT_REQUIRED_FLAG, RESUBMITTED_FLAG, RESUBMITTED_DATE, RESUBMITTED_TIME, RESUBMITTED_BY) VALUES (i, CURRENT_DATE, CURRENT_TIME, SERVICEID, DOCUMENTID, '', '', ERR, '', 'Input XML Error', '', '', '', '', '', '', '', '', '', CURRENT_DATE, CURRENT_TIME, '');

while running the message flow i got following exception..

ExceptionList
RecoverableException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbDataFlowNode.cpp
Line = 616
Function = ImbDataFlowNode::createExceptionList
Type = ComIbmMQInputNode
Name = TEST_VMI#FCMComposite_1_1
Label = TEST_VMI.INVRPT_XML_IN
Catalog = BIPv600
Severity = 3
Number = 2230
Text = Node throwing exception
RecoverableException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbDatabaseNode.cpp
Line = 295
Function = ImbDatabaseNode::evaluate
Type = ComIbmDatabaseNode
Name = TEST_VMI#FCMComposite_1_4
Label = TEST_VMI.Database
Catalog = BIPv600
Severity = 3
Number = 2230
Text = Caught exception and rethrowing
RecoverableException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbRdl\\ImbRdlStatementGroup.cpp
Line = 589
Function = SqlStatementGroup::execute
Type = ComIbmDatabaseNode
Name = TEST_VMI#FCMComposite_1_4
Label = TEST_VMI.Database
Catalog = BIPv600
Severity = 3
Number = 2488
Text = Error detected, rethrowing
Insert
Insert
Insert
RecoverableException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbRdl\\ImbRdlEvalResult.cpp
Line = 143
Function = SqlEvalResult::value
Type = ComIbmDatabaseNode
Name = TEST_VMI#FCMComposite_1_4
Label = TEST_VMI.Database
Catalog = BIPv600
Severity = 3
Number = 2556
Text = Trying to assign or use a list as a scalar[/list]
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Nov 26, 2007 11:20 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Jithesh shetty,

Make it
Jithesh shetty wrote:
SET Val = THE(select ITEM V.ERROR_DETAIL_SEQ from Database.VMI_ERROR_DETAILS AS V where V.RECORD_INSERTED_TIME = '13:34:07');

Regards.
Back to top
View user's profile Send private message Send e-mail
Jithesh shetty
PostPosted: Mon Nov 26, 2007 11:32 pm    Post subject: Database Node Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

can i use same ITEM keyword for internal select query also....

SET Val = THE(select ITEM V.ERROR_DETAIL_SEQ from Database.VMI_ERROR_DETAILS as V where V.RECORD_INSERTED_TIME = (select MAX(V.RECORD_INSERTED_TIME) from Database.VMI_ERROR_DETAILS));

is it correct???????
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Nov 27, 2007 1:02 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Jithesh shetty,

Not sure if THE ITEM can be used in an inner select, but what you pasted should work...

Are you getting any specific errors ?

Regards.
Back to top
View user's profile Send private message Send e-mail
Jithesh shetty
PostPosted: Tue Nov 27, 2007 7:24 pm    Post subject: Database Node Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

its working fine.....

THank u....
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 » Database Node
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.