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 August 4th, 2003, 01:53 PM
Authorized User
 
Join Date: Jun 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to nlicata
Default Clarifying Previous question - Sum of DB Column

Thanks in advance for answers...

I am pulling data from ms sql server - all goes well and the records are displayed in a table (actually output to an excel window in IE)... the records are displayed (nearly 30,000) but I need to now total a couple of the columns.. For example:

   Totals Price1= 50 Price2= 55 Price3= 60

               Price1 Price2 Price3
Customer A 10 11 12
Customer B 10 11 12
Customer C 10 11 12
Customer D 10 11 12
Customer E 10 11 12

This all goes well but I need a few fields across top of page to total columns. It is more complicated but if I can figure this part out I can get the rest. I thought I could do it in vbscript but am having hard time. Would it be better to create a variable in the sql select statement that totals the columns (and then I will perform some basic math on those variables to get %'s, etc.) I am newer to sql statements then I am to asp - so any help is appreciated....

Nick





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the Sum of all the values in a column.. jhansib4u ADO.NET 1 December 1st, 2007 09:15 PM
Previous field /column value in cross-tab mozilago SQL Server ASP 0 March 7th, 2007 02:58 AM
using Result form previous column... filipczako SQL Language 4 November 28th, 2005 05:41 PM
previous column & next column ct Excel VBA 4 August 19th, 2005 04:50 AM
EASY ANSWER - sum of column in db nlicata Classic ASP Databases 4 August 8th, 2003 02:49 PM





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