BobBarker_99
asked on
SQL Query - Calculate SUM Across two tables
This must be really simply, but I'm not seeing how to do it right now.
I want to do the following in 1 sql statement so I dont have to do 2 data access.
SELECT SUM(fldAmount) from tbl1 where fldID = @ContactID
-
SELECT SUM(fldRate * fldHours) from tbl2 WHERE fldID = @ContactID
(there is a subtraction between the 2 sums)
I want to do the following in 1 sql statement so I dont have to do 2 data access.
SELECT SUM(fldAmount) from tbl1 where fldID = @ContactID
-
SELECT SUM(fldRate * fldHours) from tbl2 WHERE fldID = @ContactID
(there is a subtraction between the 2 sums)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER