Totalling Columns

Results 1 to 2 of 2

Thread: Totalling Columns

  1. #1
    Join Date
    Dec 1969

    Default Totalling Columns

    I am querying a SQL Server database through ASP and formatting the results into a table. In the case of currency fields, I would like to be able to total the column and display this value in the table. Can anyone help?

  2. #2
    Join Date
    Dec 1969

    Default RE: Totalling Columns

    you would have to make two select statements:<BR><BR>CREATE PROCEDURE spSelectSomething<BR><BR>AS<BR><BR>SELECT * FROM table<BR>SELECT SUM(Currencyfield) as TotalUS FROM table<BR>GROUP by [column that you wish to group by for the total]<BR><BR>In your ASP code you have to use RecordSet.NextRecordSet to access the Sumfield<BR><BR>Check, there&#039;s an article on how to use the .NextRecordSet method.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts