I have eight select statements, each to get the sum of particular information. These are not simple queries, so I will not include them here. I have made up a simpler version (based on some code I found in a forum) as shown below.

So, I have eight sums. I need a ninth sum that is the total of all eight sums.

sample data:

n.SFRSTCR_CREDIT_HR values are 2, 2, 2

e.SFRSTCR_CREDIT_HR values are 3, 3, 3

expected results:

ResourceHours = 6

ProjectHours = 9

TotalHours = 15

select t.ResourceHours, t.ProjectHours, (t.ResourceHours+t.ProjecctHours) as TotalHours

from (select

sum(n.SFRSTCR_CREDIT_HR) from SFRSTCR n WHERE (n.SFRSTCR_TERM_code = '200980' AND n.SFRSTCR_rsts_code like 'R%' AND n.SFRSTCR_PIDM = '33271') as ResourceHours,

sum(e.SFRSTCR_CREDIT_HR) from SFRSTCR e WHERE (e.SFRSTCR_TERM_code = '201180' AND e.SFRSTCR_rsts_code like 'R%' AND e.SFRSTCR_PIDM = '33271') as ProjectHours

) t

I receive this error message:

Error at line 1

ORA-00900: invalid SQL statement ]]>