select sum(Hocount) as total from handout where type= 'H' and course = 'AFF'
select sum(seats) as total from stockentry where where type= 'H' and course = 'AFF'
select sum(Hocount) + sum(seats) as total from handout h inner join stockentry s on h.type= s.type and h.course = s.course where h.type= 'H' and h.course = 'AFF'
select sum(x.total) as Total from ( select sum(Hocount) as total from handout where type= 'H' and course = 'AFF' union select sum(seats) as total from stockentry where where type= 'H' and course = 'AFF' )x
SELECT (select sum(Hocount) as total from handout where type= 'H' and course = 'AFF') + (select sum(seats) as total from stockentry where where type= 'H' and course = 'AFF')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)