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!

SQL On Page Calulation Help

Status
Not open for further replies.

anon47

Programmer
Nov 28, 2006
80
US
Ok, let me see here. The code below is not working but what I am trying to do is have this code on an asp page to get the results of the to tables and calulate them. Any help I am stuck on this. There is no problem with just one select getting the data its only when I try to union the other.

sql = "SELECT SUM(TrustAmount) AS TrustAmount FROM [TrustPayments] WHERE [TrustPayments].[ClientID]=" &Trim(session("cs_1")) &_
Union &_
"SELECT SUM(PaymentAmount) AS PaymentAmount FROM [Checks] WHERE [Checks].[ClientID]=" &Trim(session("cs_1"))

 
Thanks guys I got it. I opened the sql statments up one at a time and created sessions to hold the value then calulated the sessions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top