SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Script Library
 Query Help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

houghjohnny
Starting Member

USA
4 Posts

Posted - 03/25/2011 :  19:12:47  Show Profile  Reply with Quote
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 CummulativeMailCount
51765 48 48
51764 119 167
51750 14656 14823
51749 1691 16514
51748 48964 65478


I 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.
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000