Hello,
I have the following script:
SELECT abc.employee, fdb.workday, abc.name, vew.program
FROM employee abc, schedule fdb, group vew
WHERE emp.prog = 'TEST'
AND vew.plan in ('ABC', 'ABB', 'AAB')
AND vew.date = to_date('03/15/1999', 'mm/dd/yyyy')
AND sum(fdb.hours) > '0.00'
AND abc.emply_num = fdb.emply_num
AND abc.period = fdb.period
AND fdb.number = vew.number
I would like to get the records displayed for hours in the schedule table totalling to more than 0.00 but it tells me "group function is not allowed here". Can someone point me to how I can accomplish this? I can't seem to get the sum function to work.
Thanks in advance,
sql99
I have the following script:
SELECT abc.employee, fdb.workday, abc.name, vew.program
FROM employee abc, schedule fdb, group vew
WHERE emp.prog = 'TEST'
AND vew.plan in ('ABC', 'ABB', 'AAB')
AND vew.date = to_date('03/15/1999', 'mm/dd/yyyy')
AND sum(fdb.hours) > '0.00'
AND abc.emply_num = fdb.emply_num
AND abc.period = fdb.period
AND fdb.number = vew.number
I would like to get the records displayed for hours in the schedule table totalling to more than 0.00 but it tells me "group function is not allowed here". Can someone point me to how I can accomplish this? I can't seem to get the sum function to work.
Thanks in advance,
sql99