Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 25th, 2005, 08:49 AM
Registered User
 
Join Date: Oct 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to get the sum from two different clolums a

I am trying to get the sum from two columns in seperate tabels, here's my code sample can someon help?
[code]

strSQL = select sum(total1 + total2) as GrandTotal from
sum1 inner join sum2 on key1 = key2


Select sum(DEU_Certification + Qtrly_Rpt_Regs)as Grandtotal from sum1 inner join sum2 on key 1 = key2

Dim intAddition
intAddition = request.form("1_Name_and_Location_of_Examining_Off ice") + request.form("1_Name_and_Location_of_Examining_Off ice") + request.form("2_Number_of_Applicants_Processed") + request.form("2_Number_of_Applicants_Processed") + request.form ("3_Number_of_Slections_Made") + request.form("3_Number_of_Slections_Made")
+ request.form("4_Number_of_Preference_Eligibles_Sel ected") + request.form ("4_Number_of_Preference_Eligibles_Selected")+ request.form("5_Number_of_Certificates_Issued") + request.form("5_Number_of_Certificates_Issued") + request.form("6_Number_of_Certificates_Not_Used") + request.form("6_Number_of_Certificates_Not_Used") + request.form("7_Number_of_certificates_unused_beca use_of_CTAP_IC TAP")
+ request.form("7_Number_of_certificates_unused_beca use_of_CTAP_IC TAP")



conn.Execute strSQL
conn.Close
Response.Redirect("Comments.asp")
End If
%>


 
Old October 25th, 2005, 10:20 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

What's the problem? Are you getting any errors? Looks good to me.






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to sum in for-each Gjella XSLT 1 October 2nd, 2006 08:48 AM
Help: Running Sum (or Cumulative Sum) timdasa VB Databases Basics 1 August 22nd, 2006 03:12 PM
sum utarian Access 2 March 28th, 2005 09:42 PM
sum ibelta Access 2 February 15th, 2005 08:53 AM
SUM or What bertlf Pro VB Databases 2 November 29th, 2003 02:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.