Author |
Message
|
cvag |
Posted: Wed Dec 01, 2010 5:30 am Post subject: Cache Refresh |
|
|
Centurion
Joined: 17 Mar 2008 Posts: 127
|
Hi All,
I'm implementing Cache refresh for particular interval of time.
And this particular interval will be in minutes and am declaring the variable as an External with INTEGER datatype.
But when i cast that integer into interval am not getting NULL value into (TimeInt).
DECLARE CACHE_INTERVAL EXTERNAL INTEGER '30';
DECLARE TimeInt INTERVAL;
SET TimeInt = CAST(CACHE_INTERVAL AS INTERVAL MINUTE);
Could anybody pls suggest, if anything missed here and need to do anymore.
Thanks in Advance. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 01, 2010 5:39 am Post subject: Re: Cache Refresh |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cvag wrote: |
Could anybody pls suggest, if anything missed here and need to do anymore. |
Make sure the UDP in the flow editor is defined as an integer (via the drop down), and that it really is an integer. The code you posted has '30' (a character literal) not 30 (an integer literal).
As always a user trace will tell the tale, as it shows all the casts (even implict ones) that occur and where your NULL turns up. The debugger just shows you what you ended up with.
Old advice but good advice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
cvag |
Posted: Wed Dec 01, 2010 5:54 am Post subject: |
|
|
Centurion
Joined: 17 Mar 2008 Posts: 127
|
Thanks Vitor for notifying,
Sorry i wrongly posted as DECLARE CACHE_INTERVAL EXTERNAL INTEGER '30';
I tried as DECLARE CACHE_INTERVAL EXTERNAL INTEGER 30
And the UDP datatype is Integer declared.
But still am getting NULL.
Suggestion Pls.,
Please dont consider the same topic posted by mistake and request to remove for moderators. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 01, 2010 6:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cvag wrote: |
Suggestion Pls., |
Taking a user trace is your next step. See where this null is coming from.
cvag wrote: |
Please dont consider the same topic posted by mistake and request to remove for moderators. |
Removed as requested. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Esa |
Posted: Thu Dec 02, 2010 10:49 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
The debugger does not show values for INTERVAL variables. So your cast may have been succesful. When debugging, add some code where you cast INTERVALs into CHARs and you should be able to see the values. |
|
Back to top |
|
 |
cvag |
Posted: Fri Dec 03, 2010 3:58 am Post subject: |
|
|
Centurion
Joined: 17 Mar 2008 Posts: 127
|
Thanks to Vitor and Esa,
Yeah its right,
As you suggested i could able to see the values set at Trace not at debug.
Thanks Again.  |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 03, 2010 5:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cvag wrote: |
As you suggested i could able to see the values set at Trace not at debug. |
The debugger claims another victim.
Glad you got it sorted.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|