On Tue, 7 Sep 2004, Lee Denny wrote:
> Hello,
>
> I need to perform a select that compares two dates
>
> I need to return all records that haven't had date_2 set after a given
> number of days since date_1.
>
... WHERE date_2 < date_1 + INTERVAL X DAY
Where X is the number of days.
Assuming th
If I understand you correctly, I think you want rows with date_2 not greater
than or equal to date_1 plus some number of days, say 30. Then date_2 needs
to be less than date_1 plus 30 days. So, you would use something like:
SELECT * FROM yourtable
WHERE date_2 < date_1 + INTERVAL 30 DAY;
T
Hello,
I need to perform a select that compares two dates
I need to return all records that haven't had date_2 set after a given
number of days since date_1.
I'm sure this can be done in one query but I just can't get my head around
this one.
Can anyone help?
Cheers,
Lee
--
MySQL General M
Michael,
Michael Stassen wrote:
Mike Blezien wrote:
Hello,
Not sure this is possible to do with SQL or if needs to be done with
in the application programming language we're using(Perl), but I need
to get the a weekdate, IE
SELECT EXTRACT(DAY FROM NOW())
which would return 30
Now what I need to
Mike Blezien wrote:
Hello,
Not sure this is possible to do with SQL or if needs to be done with in
the application programming language we're using(Perl), but I need to
get the a weekdate, IE
SELECT EXTRACT(DAY FROM NOW())
which would return 30
Now what I need to do, is if the query above is gre
Hello,
Not sure this is possible to do with SQL or if needs to be done with in the
application programming language we're using(Perl), but I need to get the a
weekdate, IE
SELECT EXTRACT(DAY FROM NOW())
which would return 30
Now what I need to do, is if the query above is greater or less then 15