Home > ASP Development > ASP Help

ASP Help



Hi
I need to know how to make Grand total
based on Dates . I have the sub total for the dates and like to make
grand total for same dates . Please see the example below


Date Sub Total Grand Total

04/25/2005 $34

0425/2005 $89

04/25/2005 $78 --------

04/26/2005 $34

04/26/2005 $56
------
04/27/2005 $23

04/27/2005 $90
--------

What I would like to know is that how to make Grand total by dates .
Grand totals for 04/25 ,04/26, 04/27 using ASP . I need to do it on the
ASP page .

I am using MS SQL server 2000 as database

Thanks

    
Guest


Example:


Code:



SELECT [Date], SUM(SubTotal) As 'Total'
FROM Table2
GROUP BY [Date]
ORDER BY [Date]




You should change the name of your Date field to something more descriptive. Date is a reserved word in most Databases.

Was this answer helpful ? Yes No   
Guest


kmandal - please don't cross-post in more than one forum.

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved