Cc: mysql@lists.mysql.com
Subject: Re: Datediff function
Gavin Towey wrote:
> Hi John,
>
> You can't use aggregate function in the WHERE clause, because they aren't
> evaluated until after the WHERE clause is applied.
>
> Wouldn't it be much easier to simply keep a
>-Original Message-
>From: Gavin Towey [mailto:gto...@ffn.com]
>Sent: Wednesday, September 16, 2009 7:34 PM
>To: John Meyer; mysql@lists.mysql.com
>Subject: RE: Datediff function
>
>Hi John,
>
>You can't use aggregate function in the WHERE clause, because th
John Meyer wrote:
I'm trying to pull up a list of users who haven't tweeted in 7 or more
days, and I'm trying to use this statement:
SELECT USER_NAME, MAX(TWEET_CREATEDAT) FROM USERS NATURAL JOIN TWEETS
WHERE DATEDIFF(NOW(),MAX(TWEET_CREATEDAT)) > 7
But it says "invali
Gavin Towey wrote:
Hi John,
You can't use aggregate function in the WHERE clause, because they aren't
evaluated until after the WHERE clause is applied.
Wouldn't it be much easier to simply keep a last_tweet_date field updated
somewhere then simply do
SELECT USER_NAME FROM USERS WHERE last_tw
weet_date < NOW()-INTERVAL 7 DAY; ?
Regards,
Gavin Towey
-Original Message-
From: John Meyer [mailto:johnme...@pueblocomputing.com]
Sent: Wednesday, September 16, 2009 12:52 PM
To: mysql@lists.mysql.com
Subject: Datediff function
I'm trying to pull up a list of users who haven't tw
I'm trying to pull up a list of users who haven't tweeted in 7 or more
days, and I'm trying to use this statement:
SELECT USER_NAME, MAX(TWEET_CREATEDAT) FROM USERS NATURAL JOIN TWEETS
WHERE DATEDIFF(NOW(),MAX(TWEET_CREATEDAT)) > 7 GROUP BY USERS.USER_ID
But it says "
Peter Lauri schrieb:
Best groupmember,
I run version 3.23.58 and need to use something similar to DATEDIFF and
TIMEDIFF to calculate difference between two a timestamp and
current_timestamp().
Is there any other function that is working for version 3.23.58 that do the
same job?
Best regards
Best groupmember,
I run version 3.23.58 and need to use something similar to DATEDIFF and
TIMEDIFF to calculate difference between two a timestamp and
current_timestamp().
Is there any other function that is working for version 3.23.58 that do the
same job?
Best regards,
Peter Lauri
--
MySQL
Scott Haneda <[EMAIL PROTECTED]> wrote on 07/06/2005 08:16:41 PM:
> I am using 4.0.18-standard
> So I do not have `DATEDIFF`, but I need to ability to do so, anyone know
> some other simple trick to get days be
Scott Haneda wrote:
>I am using 4.0.18-standard
>So I do not have `DATEDIFF`, but I need to ability to do so, anyone know
>some other simple trick to get days between two dates?
>
>
to_days(SomeDate) - to_days(SomeOtherDate)
will give you the number of days between the 2.
--
I am using 4.0.18-standard
So I do not have `DATEDIFF`, but I need to ability to do so, anyone know
some other simple trick to get days between two dates?
--
-
Scott HanedaTel: 415.898.2602
<h
--- Paul DuBois <[EMAIL PROTECTED]> wrote:
> There's a space beteeen the function name and the
> following
> parenthesis.
>
Yes, that and not remembering I'm still on 4.0.22 :)
Yeesh...sorry Paul.
Switched to TO_DAYS ..no diff I guess
Stuart
--
MySQL General Mailing List
For list archives
At 5:31 -0800 11/27/04, Stuart Felenstein wrote:
Does DATEDIFF only work with actual dates input i.e
('2004-12-05'
Or couldn't I do :
Select DATEDIFF (StartDate, EndDate) AS DaysBtwn from
mytable?
(StateDate,EndDate are date columns from db)
I'm generating a syntax
Does DATEDIFF only work with actual dates input i.e
('2004-12-05'
Or couldn't I do :
Select DATEDIFF (StartDate, EndDate) AS DaysBtwn from
mytable?
(StateDate,EndDate are date columns from db)
I'm generating a syntax error on this above.
Stuart
--
MySQL Gene
Michael Stassen said:
>
> Gabriel Alessandria wrote:
>
>> I am a user of Microsoft Sql Server and use very much the function
>> Datediff (interval, fecha1, fecha2) to extract differences between two
>> dates, in years, days, months, hours, etc
>>
>> I am a
Gabriel Alessandria wrote:
I am a user of Microsoft Sql Server and use very much the function Datediff
(interval, fecha1, fecha2) to extract differences between two dates, in
years, days, months, hours, etc
I am a beginner with MySql and i can't see the way to do this function ..
How
I am a user of Microsoft Sql Server and use very much the function Datediff
(interval, fecha1, fecha2) to extract differences between two dates, in
years, days, months, hours, etc
I am a beginner with MySql and i can't see the way to do this function ..
How can I extract for example differen
17 matches
Mail list logo