Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread INTERVAL again...
Wed, Dec 15 2021 5:18 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I have the following..
{sql}
(e.datetime - c.datetime) > interval '30' minute
{sql}
as part of where clause.
both datetimes are full datetimes..
I am after where e.datetime is more than 30 minutes after c.datetime.
In edbmgr I get the error..
"ElevateDB Error #700 An error was found in the statement at line 2 and column 88 (Expected Interval Day To MSecond expression but instead found INTERVAL '30' MINUTE)"

Ummmm.  Why??

Regards & TIA,
Ian
Thu, Dec 16 2021 1:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


Alter your SQL to

(e.datetime - c.datetime) minute > interval '30' minute

Why? - My view the weirdness of the SQL standard settings mob. Others would say that you were trying to compare to different qualities ie TIMESTAMP and MINUTE. Pick which ever answer you like!

Roy Lambert
Thu, Dec 16 2021 4:55 AMPermanent Link

Ian Branch

Avatar

Or both. Smile
Thanks Roy.
Image