Hi!
Try this:
SELECT TD.project_id, P.project_manager,
SUM( TD.time_hours_worked ) as hours
FROM time_daily TD
INNER JOIN projects P ON P.project_id = TD.time_project_id
WHERE TD.time_user_id = 'xpt'
HAVING hours <> '0.00'
Hope this helps!
On Wed, 2003-09-03 at 17:24, Cory Hicks wrote:
> Hey folks,
>
> I am trying to run the following sql query in mysql:
>
> SELECT TD.project_id, P.project_manager
> FROM time_daily TD
> INNER JOIN projects P ON P.project_id = TD.time_project_id
> WHERE TD.time_user_id = 'xpt' AND (
> SUM( TD.time_hours_worked ) <> '0.00'
> )
>
> And I keep getting the #1111 errno.....- Invalid use of group function -
>
> I don't want to pull out any rows where the SUM of time_hours_worked is
> '0.00'...
>
> I would be most grateful if anyone has any suggestions....
>
> Many thanks!
>
> Cory
--
Diana Soares
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]