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
 Table partitioning
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

youngb912
Starting Member

USA
14 Posts

Posted - 06/17/2010 :  21:02:06  Show Profile  Reply with Quote
I need to partition an existing table as below. The table name is sales_log. Here is what I'm doing so far

CREATE PARTITION FUNCTION MyPartitionRange (Date)
AS RANGE LEFT FOR VALUES (1)

Partition 1 – Partition value <= 20 days
Partition 2 – Partition value > 20 days

CREATE PARTITION SCHEME MyPartitionScheme AS
PARTITION MyPartitionRange
ALL TO ([PRIMARY])

I copied the above from a site as my template. Now I want to partition an existing table (Saleslog) so that data less than 20days remain on partition1 and those older than 20 goes to partition two. How do I get this to work?
  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.09 seconds. Powered By: Snitz Forums 2000