Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Show Running Total

Author  Topic 

Kumara
Starting Member

2 Posts

Posted - 2003-01-30 : 12:27:12
Hi all,

I want to write sql to get a runing total of Invoice_amt in invoice table, for a given customer,

How can I do this ?

Thanks
Kumara.

X002548
Not Just a Number

15586 Posts

Posted - 2003-01-30 : 12:36:07
Not sure what you mean by a "running total", but to get all of the invoice amounts for a given customer:

Select Customer_Id, Sum(Invoice_Amt)
From Table
Where Customer_Id = n
Group By Customer_Id

Where n is the actual Id of the Customer

Hope this Helps

Happy Hunting

Brett

8-)

Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-01-30 : 13:16:13
http://www.sqlteam.com/item.asp?ItemID=3856

Go to Top of Page
   

- Advertisement -