hi,
you can add
...
...
 group by
   a.assignmentid,
   a.attenddate;
having sum(a.attendhours) != s.attendhours

Mathias

Selon Scott Pippin <[EMAIL PROTECTED]>:

> I have the following query.
>
> select
>   sum(a.attendhours),
>   s.attendhours
> from
>   attendance a,
>   attsum s
> where
>   a.siteid = s.siteid and
>   a.assignmentid = s.assignmentid and
>   a.attenddate = s.attenddate and
>   a.siteid = 'XXX' and
>   a.attenddate >= 'XXXX-XX-XX'
> group by
>   a.assignmentid,
>   a.attenddate;
>
> I want it to return those values where sum(a.attendhours) does not equal
> s.attendhours.  What more do I need to add to my query to accomplish this?
>
> Thanks in Advance
>
> Scott Pippin
> [EMAIL PROTECTED]
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to