I currently have two select commands as per below. What I would like to do is to add the results together in the SQL query rather than the variables in code.
select sum(hours) from resource;
select sum(hours) from projects-time;
Yes. It is possible
SELECT SUM(totalHours) totalHours FROM ( select sum(hours) totalHours from resource UNION ALL select sum(hours) totalHours from projects-time ) s
As a sidenote, the tablename
projects-time must be delimited to avoid syntax error. Delimiter symbols vary on RDBMS you are using.