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)
 Accumlation on a number of records

Author  Topic 

geossl
Yak Posting Veteran

85 Posts

Posted - 2004-03-19 : 04:45:53
Dear All,
Can I accumulate the number on a number of records. For example, for every three record, the accumulated number is increment by 1.


Stk_Name AccumulateNo
-------- -----------
AAAAAAAA 1
BBBBBBBB 1
CCCCCCCC 1
DDDDDDDD 2
EEEEEEEE 2
FFFFFFFF 2
GGGGGGGG 3
OOOOOOOO 3


Thanks

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-03-19 : 05:02:33
This is possible, but you probably wont have the results that you are looking for.
What I mean is the order of the results is not gaurenteed. see what merkin said here.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=33483



Duane.
Go to Top of Page
   

- Advertisement -