Posted: Tue Jul 19, 2011 4:35 am Post subject: INTERVAL Syntax funny
Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
Here is a bit of ESQL.
Code:
CREATE FUNCTION Calc_Time_Difference (T1 TIMESTAMP, T2 TIMESTAMP) RETURNS FLOAT BEGIN
DECLARE timeInterval INTERVAL;
DECLARE TDiff FLOAT;
SET timeInterval = (T1 - T2) SECOND;
SET TDiff = ABS(CAST(timeInterval as FLOAT));
RETURN TDiff;
END;
This has been working fine in various fixpack of V6.1.
When I try to deploy a flow with this code to 7.0.0.2 (on Linux) the deploy fails
Code:
SQL statement text. See the following messages for details of the error
The following error messages will give specific details of the location and nature of the error. Check and correct the syntax of the SQL statements and redeploy.
BIP2403E: (.ESB_Service_Monitoring_Stop_Monitoring_Self.Calc_Time_Difference, 5.37) : An interval qualifier is not allowed here.
An interval qualifier was specified after a pair of parentheses which did not contain a subtraction expression.
Correct the syntax of your ESQL expression in node '.ESB_Service_Monitoring_Stop_Monitoring_Self.Calc_Time_Difference', around line and column '5.37', then redeploy the message flow.
EH? There is indeed an Interval but there is a subtraction in the setting of it.
Any thoughts on why etc most welcome. I recon this is a defect. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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