We have a system that includes a DB with tens of tables, some with evolving DATA and some with rather static Steering information.
The system is now running within a number of environments, one is the DEVEL that the others serve various purposes (including "PRODUCTION").
On behalf of data security, there is no data-link between the PRODUCTION and any other and hence updates must be done using files.
There are some tables that can be completely copied from DEVEL to PRODUCTION white there are other tables that only a selected set of records should be copied.
Since the update process (e.g. to PRODUCTION) will take place many times in the future, I would very much like to write a simple script that will write another script to be ran on the target environment (e.g. PRODUCTION) with all the required updates for the selected set of tables (I already have a similar working script for the "PROGRAMMABILITY" part).
I'm looking for SQL Server (via Management Studio) commands I could use to generate a script with all the insert records for both cases (i.e. some tables without filters while others with).
Edit
Here follows some sample data (just to demonstrate what I am looking for).
In this example, the users will have access to the contents of this table to all the records belonging the the "Public" category, the "System" category will be hidden to them though parts of the system's functionality will be governed by this last category.
Whenever we update the functionality of the system, we may need to modify the contents of one or more collections under the "System" category. As such, it would be best if we could simply delete all the records with Categoty = "System" and Collection_Name = "Status" (in this example of course) and insert the new updated list, all that without touching the categories managed by the users ("Public" in the example).
If course, you would ask "Why don't you split it into two separate tables?" Good question, and the answer is we simply can't.