with no comma (sorry):
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 >= '-XX-XX'
group by
a.assignmentid,
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.
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 >= '-XX-XX'
group by
a.assignmentid,
a.att