One request - I'd be very nice if MaxDB supported intervals. It makes writing queries that involve, um, intervals very easy.
Cheers, David
Andris Spruds wrote:
You could write a stored procedure, but it would be difficult to write one that takes care of long years.
----- Original Message ----- From: "David Brady" <[EMAIL PROTECTED]>
To: "Andris Spruds" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 05, 2004 11:47 PM
Subject: Re: Date ranges without intervals...
Andris Spruds wrote:
Thanks...The 2nd argument is time in days. Furthermore, you can construct the 2nd date outside MaxDB.
Example: SELECT adddate('2003-12-01 00:00:00', 31) FROM DUAL
This won't work since months have different numbers of days. (And, I'd have to hack at a 3rd party reporting tool to construct the second date - I'm reluctant to go for that solution.) Is there any way to get the number of days for a month, given a year and a month?
The best I can come up with is to use Oracle mode (I hate to do it though) and:
post_date >= '2003-12-01 00:00:00' and post_date < add_months('2003-12-01 00:00:00', 1)
I'd like to think there's a way of doing this without Oracle mode, though...
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
