Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query help -Sum current and ID

Status
Not open for further replies.

Sammy145

Programmer
Oct 4, 2002
173
GB
Hi guys,

Table structure
Groupid value
1 0.91
2 1.2
3 0.2
4 1.6
I need to sumamrize the table. Add new coloumn-Summarygroupvalue2

Groupid value Summarygroupvalue2
1 0.91 0.91+1.2
2 1.2 1.2+0.2
3 0.2 0.2+ 1.6
4 1.6 1.6

How can I acheive Summarygroupvalue2 by adding row by row based on next group id?

Any help appreciated.
 
Figured it out using subquery to next next row.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top