SQL Combine

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone help me with the following SQL problem?
How would I combine the following statements so they would produce exp2 /
new. Where and how do I combine them? Thanks.

SELECT Sum(Total) FROM exp2 Where Date1>='::startdate::' and Date1<=
'::enddate::'

SELECT Sum(SumOfTaxExclusiveTotal) FROM new Where Date1>='::startdate::' and
Date1<= '::enddate::'
 
SELECT Sum(Total)
FROM exp2
Where Date1>='::startdate::' and Date1<= '::enddate::'
UNION ALL
SELECT Sum(SumOfTaxExclusiveTotal)
FROM new
Where Date1>='::startdate::' and Date1<= '::enddate::' ;
 
That works pretty cool. What I really need is the addition of the two or
divide or multiply. How would that look?

Thanks.
 
That works pretty cool. What I really need is the addition of the two or
divide or multiply. How would that look? What do I need in place of the
"UNION ALL"? Thanks.
 
Back
Top