Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 21 to 25 of 25 total |
Inverval problem |
Fri, Sep 4 2009 10:59 AM | Permanent Link |
Uli Becker | Tim ,
> Not with the INTERVAL keyword in front of it. OK, but then > select * from kalender where > StartTime - interval DaysBefore DAY > CURRENT_DATE should work as well? Actually that's what I tried first. I guess this syntax is only valid with constants, isn't it? Uli |
Fri, Sep 4 2009 12:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< This proves not to be the case >> Just make sure that you put single quotes around them. It may work for single integer values, but it won't work for HH:MM and it isn't standard. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Sep 4 2009 12:51 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< should work as well? Actually that's what I tried first. I guess this syntax is only valid with constants, isn't it? >> You're confusing INTERVAL constants with CASTing a value to an INTERVAL. You can't CAST a value to an INTERVAL by just putting the keyword INTERVAL in front of it. Just think of it like a date or time, which require the keywords 'DATE' or 'TIME' in front of the date or time that is enclosed in single-quotes after the keyword. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Sep 4 2009 1:20 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>You're confusing INTERVAL constants with CASTing a value to an INTERVAL. >You can't CAST a value to an INTERVAL by just putting the keyword INTERVAL >in front of it. Just think of it like a date or time, which require the >keywords 'DATE' or 'TIME' in front of the date or time that is enclosed in >single-quotes after the keyword. That's a very good point and I for one have been guilty of doing just that. Intuitively it seems correct. Roy Lambert |
Fri, Sep 4 2009 2:16 PM | Permanent Link |
Uli Becker | Tim,
> You're confusing INTERVAL constants with CASTing a value to an INTERVAL. > You can't CAST a value to an INTERVAL by just putting the keyword INTERVAL > in front of it. Just think of it like a date or time, which require the > keywords 'DATE' or 'TIME' in front of the date or time that is enclosed in > single-quotes after the keyword. Thank you for making that clear. The secret is disclosed. Uli |
« Previous Page | Page 3 of 3 | |
Jump to Page: 1 2 3 |
This web page was last updated on Thursday, May 23, 2024 at 07:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |