You would use this script if you wanted a regular version of table data creating into its own table, if you wanted to track changes etc. Firstly, set your first 3 variables: @DatabaseName, @SchemaName, @SelectFromTableName VARCHAR Variables wtih the relevant values. There are already values in here, so change them to what you want them to be. To set this to run on a regular basis, you might want to paste this code in a stored procedure and schedule it on a SQL Agent Job. A possible way to extend this script is to add a where clause to the select statement, so that you are only selecting the data where a date field in the table is for current day. Please contact if you have any comments or suggestions
Learn how to design, build and test a dynamic search SP in just a few simple but methodical steps.