Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The sum function requires 1 argument(s).

508050Jul 2 2008 — edited Jul 3 2008
---Hi i am trying get all of
(sum(Q.SCTOTAL,0)) as SC,
(sum(Q.SRTOTAL,0)) as SRTOTAL,
(sum(Q.CminusREF,0))as CminusREF,
(sum(Q.SFAT,0))as SFAT,
(sum(Q.SPAT,0))as SPAT,
(sum(Q.SNOTATPT,0))as SNOTATPT,
(sum(Q.SET,0))as SET,
(sum(Q.TOTAV,0))as TOTAV
and for each emp_name?

but it is not wotking for me. the error says: The sum function requires 1 argument(s).
what shoould i change on the code below so mY Query can Run?

thank you
B.
----------------------------------------------------

select distinct
G.Emp_name,
upper(G.EMP_case_number) as MIS_EMP_case_NO,
G.Emp_name as Emp,
G.MIS_Emp_id,Radius,
G.address,
G.DC as Emp_DC,
G.Emp_class,
Q.YEAR,
Q.EMP_case_number,

(sum(Q.SCTOTAL,0)) as SC,
(sum(Q.SRTOTAL,0)) as SRTOTAL,
(sum(Q.CminusREF,0))as CminusREF,
(sum(Q.SFAT,0))as SFAT,
(sum(Q.SPAT,0))as SPAT,
(sum(Q.SNOTATPT,0))as SNOTATPT,
(sum(Q.SET,0))as SET,
(sum(Q.TOTAV,0))as TOTAV

FROM tbl_MIS_QC G
LEFT JOIN QCPFA Q ----View
ON upper(Q.EMP_case_number) = upper(G.EMP_case_number)
where DC = '55'
gorup by G.Emp_name
order by G.Emp_name, upper(G.EMP_case_number)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2008
Added on Jul 2 2008
2 comments
3,332 views