Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
Help with SQL and date expression |
Sun, Jul 19 2009 11:47 PM | Permanent Link |
"Adam H." | Hi,
I'm trying to run the following SQL statement in EDB. It works with DBISam, but not EDB and was wondering what is the correct method to execute this in EDB? select * from Log where (0=0) /*1*/ and (DateTime > (current_date - 60)) order by Record The line marked as /*1*/ is where the problem occurs (or particularly with the current_date - 60 expression). I'm trying to retrieve a list of records that exist within the last 60 days of when the script is ran. Also - as a minor issue, I've noticed in the EDB Manager (Unicode) 1.09b4 the above is not displayed correctly. The line I'm having problems with is all showing in 'comment italic green', instead of just the text between the /* and */. I don't believe this is related, but probably just a small overlook in the EDB Manager code. Cheers Adam. |
Mon, Jul 20 2009 3:21 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
Congratulations you found intervals ElevateDB follows the SQL2003 standard so the good old simple date subtraction etc is no longer there Something like select * from Log where (0=0) /*1*/ and (current_date - DateTime INTERVAL DAY) > (current_date - 60)) order by Record should work. Not tested and INTERVALs is one of the concepts in ElevateDB my poor old brain has trouble with. Roy Lambert [Team Elevate] |
Mon, Jul 20 2009 10:49 AM | Permanent Link |
Fernando Dias Team Elevate | Adam,
SELECT * FROM Log WHERE DateTime > (CURRENT_DATE - INTERVAL '60' DAY) ORDER BY Record -- Fernando Dias [Team Elevate] |
Mon, Jul 20 2009 11:21 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< Also - as a minor issue, I've noticed in the EDB Manager (Unicode) 1.09b4 the above is not displayed correctly. The line I'm having problems with is all showing in 'comment italic green', instead of just the text between the /* and */. I don't believe this is related, but probably just a small overlook in the EDB Manager code. >> This has since been fixed, although I'm not sure when because it appears as though it wasn't logged. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |