I'm new to SQL Server Partitioning. I have a set of data that I wish to partition per day. Each day, I want to create that days parttion and swap out the oldest day (defined by a configurable retention period).For instance, I have a retention period of 5 days, therefore, on initial creation:CREATE DATABASE CRDMGOUSE CRDMGOCREATE TABLE Header( TransactionID INT, EndTransDateTime DATETIME, Amount DECIMAL(10,2))GOCREATE PARTITION FUNCTION Pfn_Header_EndTransDateTime (DATETIME)AS RANGE RIGHTFOR VALUES ('20100522','20100523','20100524','20100525','20100526')GOBut tomorrow, the function needs to be:CREATE PARTITION FUNCTION Pfn_Header_EndTransDateTime (DATETIME)AS RANGE RIGHTFOR VALUES ('20100523','20100524','20100525','20100526','20100527')GO How do I go about doing this? Do I need to create a job to 'alter' the partition function on a daily basis, or do I drop and recreate it, or is there TSQL that caters for this requirement (swap out partitions and bring in new)? If so, then how will the partition function reflect the correct values? Sorry, but I really know nothing about his subject, so any help will be greatly appreciated........Hearty head pats