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

creating a query for the Sum of 3 fields from 3 different queries

Status
Not open for further replies.

lieip

Programmer
Oct 2, 2001
12
US
I get an error message query is too complex when i try to create a query that adds 3 fields from three other queries. What can i do to fix this error?
 
Hello lieip,

What database are you using?
What is the query?

In SQL Server a query like this works just fine.
Code:
SELECT @valueFinal = (SELECT MAX(valueOne) FROM tableOne) + (SELECT MAX(valueTwo) FROM tableTwo) + (SELECT MAX(valueThree) FROM tableThree)

You might want to post your question in a database forum instead of the ASP forum since queries are not part of ASP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top