Posted: Tue Aug 01, 2006 1:46 am Post subject: Converting an Integer or String value to INTERVAL in ESQL
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
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