grouping data in tables

  • in my database i have a table that is exponential growing..i want to group the data on weekly bases i want to create a job that lets say create a table with name from date 1 to date 2 and copies data from the main table that falls within that date..the name is dynamically changing....so how can i do that? please help

  • It would be nice if you can use Horizontal Table Partitions. In this way you can define the date range in partition function and store your data in respective partitions. After creation Partition Function and Table, data will automatically stored in respective partitions so need to create different Table. Still if you want to create Physical tables then you can go for SSIS or write a T-SQL batch and run it through SQL server Agent.

  • You can use attached Script for more information. Also change the script as per your requirement.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply