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.
Author |
Topic |
houghjohnny
Starting Member
4 Posts |
Posted - 2011-03-25 : 19:12:47
|
I am getting ready to create a local partition view on a table that has approximately 3 billion rows the goal is to create 40 new DB and partition this table accross the 40 DB each table will hold approximately 75 million rows. The partitioning column I am using is a int there are no timestamp columns in this table my dilemna is this. I need help writing a query that will give me three columns here is an example of the data I want to retrieve I already have the first two columns down I just need help populating the third colum (CummulativeMailCount)groupid NumberOfMails CummulativeMailCount51765 48 4851764 119 16751750 14656 1482351749 1691 1651451748 48964 65478I want the cummulative mail count to increment all previous groupid number of mails until it gets to 75 million than I would like it to reset and start over until it gets to 75 million again the reason I need this is so I can create the check constraints for the partitioned tables. Please help I hope this question is clear if further explanation is needed I can gladly oblige thanks ahead for any help you can provide. |
|
|
|
|