![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Aug 13 2019 5:52 AM | Permanent Link |
Yusuf Zorlu MicrotronX - Speditionssoftware vom Profi | Hi, i try to get following sql work but have a problem understanding the error message:
select dtstamp, current_timestamp, current_timestamp-dtstamp, cast(current_timestamp-dtstamp as interval minute), cast((current_timestamp-dtstamp) as integer)/60 notworking from mytable - the dtstamp field is a timestamp Exception: ElevateDB Error #700 An error was found in the statement at line 3 and column 7 (Expected Char, VarChar, Byte, VarByte, Boolean, SmallInt, Integer, BigInt, Float, Decimal, Interval Year, Interval Day, Interval Hour, Interval Minute, Interval Second, or Interval MSecond expression but instead found (CURRENT_TIMESTAMP() - "dtstamp")) Yusuf Zorlu MicrotronX |
Tue, Aug 13 2019 6:02 AM | Permanent Link |
Yusuf Zorlu MicrotronX - Speditionssoftware vom Profi | I see that this works, but is it the "correct" way?
cast(abs(cast(current_timestamp-dtstamp as interval minute )) as integer) Yusuf Zorlu MicrotronX |
Tue, Aug 13 2019 9:40 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Yusuf
If it works its a correct way ![]() You've just encountered the fact that unlike DBISAM date, time & timestamp are no longer floats - they now have their own type and date/time arithmetic is a bit more complex than it used to be. The only bit of your code I would question is ABS - if dtstamp is guaranteed to always be less than current_timestamp then it shouldn't be needed Roy Lambert |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |