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)
 Pls help me

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-02-10 : 09:38:54
dinesh writes "I have asked a question of running total field in a table. like we have two fields in a table emp (empid,salary)
e001 1000
e002 2000
e003 3000
e004 4000

query should return

e001 1000
e002 3000
e003 6000
e004 10000

how is it possible through a single query. pls help me on this"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-02-10 : 09:44:10
refer to here http://www.sqlteam.com/item.asp?ItemID=3856

----------------------------------
'KH'

everything that has a beginning has an end
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-10 : 09:48:45
If you use Reports to show the data, use its Running Total feature. Using that approach becomes inefficent for more number of data

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -