Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtracting Query results.....

Status
Not open for further replies.

vince99

IS-IT--Management
Mar 1, 2001
63
US
I have two queries that return an amount....

I want to setup a query so that It will subtract amount 1 form amount 2...

Any Suggestions on what I should do?

Thanks
 
Depends, a bit, on how/what the queries are returning, but basically, set each query result to a varible and subtract the two variables. It MIGHT be easier to generate a single query which joins the two sources and just have the query do the math internally, ... but then we don't have anywhere enough info to make this judgement.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
One idea:
SELECT t.a, t.b, t.c, t.d
FROM [select x as a,xx as b, zz as c, tt as d from table1]. AS t; John Fill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top