mysql timediff where condition
I have to use a condition in the time diff of mysql. I have to modify the
following query:-
select
bugs_team_user_view.bug_id,
bugs_team_user_view.creation_ts
from
bugs_team_user_view, bugs_activity
where
bugs_team_user_view.team like "Red%"
and
timediff(
(select bugs_activity.bug_when from bugs_activity where
bugs_activity.added = "RESOLVED"),
bugs_team_user_view.creation_ts) > "00:30:00"
and
bugs_team_user_view.bug_id=bugs_activity.bug_id
and bugs_team_user_view.creation_ts < "2013-08-17 00:00:00"
and bugs_team_user_view.creation_ts >"2013-08-01 00:00:00";
Getting error:-
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
usenear 'bugs_team_user_view.creation_ts < "2013-08-17 00:00:00" and
bugs_team_user_view.' at line 1
Please help
No comments:
Post a Comment