Looks like I can't really do simple math with dates -
http://www.oooforum.org/forum/viewtopic.phtml?t=45245&highlight=date+mat
h 

-----Original Message-----
From: Tom Chilton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 4:41 PM
To: [email protected]
Subject: Re: [users] Base - SELECT * FROM Table1 WHERE SYSDATE -
DateField > 30

Do you mean selecting records for the last month?
try

SELECT * FROM Table1 WHERE dateField > SYSDATE - 30

I think because you can take 30 days from a date but can't compare a
whole date to a single integer.
No doubt I'm wrong but give it a try...

change the > to < should do it if you want dates in the future

Hope this helps


On 27 Feb 2007, at 13:23, Kirill S. Palagin wrote:

Hello.

Our customer is trying to make statement SELECT * FROM Table1 WHERE
SYSDATE - DateField > 30 work and gets "Wrong data type in statement..."

What would be correct statement to select rows with "DateField" older
than 30 days from now?

Thanks a lot.
WBR,
K. Palagin.

----------------------------------
Tom Chilton
[EMAIL PROTECTED]
----------------------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to