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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculations using unions

Status
Not open for further replies.

Stewman

MIS
Jan 23, 2002
79
0
0
US
Hello,

I have a query consisting of 3 queries all union-ed together each returning a specific count. My end result looks like this:
Kount Type
786 Duplicates
11737 Orders
38503 Calls

What I want is to do the following calculation within this sql query.

(Calls + Orders) - Duplicates

Is this possible?

Thanks,

Stewman

 
Hi Duane,

Thanks for the response. When I try this (on Oracle btw) I get the error back ORA-00907:missing right parenthesis. Any ideas?

 
on Oracle btw
So, why posting in a JetSQL (Microsoft) forum ?
I'd ask in an Oracle forum here.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yeah good point. Didn't realize this was for ACCESS and Jet. I thought it was general SQL. I'll post on an oracle forum.
 
You'ld be using Case rather than Immediate If.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top