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 » Converting an Integer or String value to INTERVAL in ESQL

Post new topic  Reply to topic
 Converting an Integer or String value to INTERVAL in ESQL « View previous topic :: View next topic » 
Author Message
kshah
PostPosted: Tue Aug 01, 2006 1:46 am    Post subject: Converting an Integer or String value to INTERVAL in ESQL Reply with quote

Novice

Joined: 13 Jun 2005
Posts: 23

Hi..

I have a pecuilar situation where i have a typical..IF CONDITION in the code..

Code:
IF CacheQueueTable.LastUpDate is null or (CURRENT_TIMESTAMP - CacheQueueTable.LastUpDate) second > INTERVAL '60' Second THEN


Now in above code... number 60 is hardcoded..
but actually i want that value to be decided at run time from a value mentioned in some field in incoming message.

I am trying following code but some how its not working..i m able to compile n deploy.

Code:
DECLARE xyz INTERVAL ;   
SET xyz =CAST(60 AS INTERVAL SECOND);   


but at runtime..when i debug the code i dont see xyz getting intialized..

M I missing out something here...DO let me know..
Thanks for ur help...in advance

Kshah
Back to top
View user's profile Send private message
jbanoop
PostPosted: Tue Aug 01, 2006 3:23 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

i think during debug the interval variable does not get displayed. However the cast should actually work.

Eg if you have
DECLARE sSecondValue CHARACTER '60';

DECLARE iDayInterval INTERVAL CAST(sSecondValue AS INTERVAL SECOND);

Should work ..
ignore the debugger and run it and see the result.

Anoop
Back to top
View user's profile Send private message Yahoo Messenger
kshah
PostPosted: Tue Aug 01, 2006 11:05 pm    Post subject: [Solved]Issue Reply with quote

Novice

Joined: 13 Jun 2005
Posts: 23

Hi anoop,,

Thannks for ur help...u where right debugger just dont show the INTERVAL variable.

I tried withoiut the debugger and flow is working as required.

following is the code that worked

Code:
DECLARE timeinterval CHARACTER;
SET timeinterval = '60';
DECLARE xyz INTERVAL ;   
SET xyz =CAST(timeinterval AS INTERVAL SECOND);   


IF i convert this interval variable 'xyz' above to character and c the output in debuger i get value as INTERVAL '60' SECOND

and not as 60 which i intially thought

thanks...thanks anoop a lot..

Regards
Kshah
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 » Converting an Integer or String value to INTERVAL in ESQL
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.