What are you trying to achieve with the expression SUM(`(File_Size)`/1000)
AS KiloCharacters" in the ORDER BY clause?  Remove it from the Order By
clause, or add it to your Select list and remove the alias from the ORDER BY
entry.  If you are trying to order the files by size as the 4th sort order
criteria, simply use SUM(File_Size) instead.

HTH,
Tore.

-----Original Message-----
From: Nudrat Usmani [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:54 AM
To: ActiveServerPages
Subject: RE: Summary calculations


Thanks , here is the code , this works , I need a summary of cumalative file
size for each Dest. Dir, any suggestions

"SELECT `Dest_Dir`, LEFT$(`File_Name`, 5) AS AccountSecurity,
Mid$(`File_Name`, 6, 1)
AS File_Type, SUM(Entry_Count) AS SumOfEntry_Count, SUM(File_Size) AS
SumOfFile_Size
FROM `BillingEntry_6-2002` GROUP BY Dest_Dir, LEFT$(`File_Name`, 5),
Mid$(`File_Name`, 6, 1)
ORDER BY Dest_Dir, LEFT$(`File_Name`, 5), Mid$(`File_Name`, 6, 1),
SUM(`(File_Size)`/1000) AS KiloCharacters"

Nudrat

-----Original Message-----
From: David L. Penton [mailto:[EMAIL PROTECTED]]
Sent: August 26, 2002 9:24 AM
To: ActiveServerPages
Subject: RE: Summary calculations


Post code/sql.  If indeed you want a SUM from data in a table, then SUM() is
the way to do it.

David L. Penton, Microsoft MVP
JCPenney Application Specialist / Lead
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED]

Do you have the VBScript Docs or SQL BOL installed?  If not, why not?
VBScript Docs: http://www.davidpenton.com/vbscript
SQL BOL: http://www.davidpenton.com/sqlbol


-----Original Message-----
From: Nudrat Usmani [mailto:[EMAIL PROTECTED]]

Hello :
Does any one know how to do summaary and totals calculations on an ASP page.
I am retrieving data from an access database using a sql query. I have used
sum function in the query,
sum of sum of  function does not seem to work.

Please help
Nudrat


---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to