We may need to transfer records from Development to Production, we have many ways to do that, let me show how to generate ‘Insert statements’ using StoredProcedure for the required SQL Server table from which we need to transfer data.

download ‘GenerateInsertStatements‘ script to generate ‘Insert Statement’ of a SQL Server Table

Let me show how it works…

Script need two parameters ‘table name’ and ‘schema name’, if we submit those two parameters it will generate ‘Insert statements’ for the given table.

Another case here is to consider IDENTITY column while generating insert data script. Let’s revise the above example by considering Id as identity column.

I have attached the procedure, just try using the procedure in your free time…

About these ads