I have this sql query string, but it says that ACTHRSSUM is not in any of the specified tables... Can't I used a summed column in a where clause?
I want to know where the sum of acthrs is greater than a workcenter's 'hperday'.
Code:
select sum(acthrs) as acthrssum, workdate, lcrwc, hperday from bmartin/lcrdump join bmartin/wcdump on lcrwc = workcenter where workdate between '1968-11-21' and '2008-11-29' and acthrssum > hperday group by workdate, lcrwc, hperday order by lcrwc, workdate
Comment