Sql server

Insert Statement Script Generator Procedure

Insert statement generator for database CREATE PROC [dbo].[InsertGenerator] (@tableName varchar(100)) as –Declare a cursor to retrieve column specific information for the specified table DECLARE cursCol CURSOR FAST_FORWARD FOR SELECT column_name,data_type FROM information_schema.columns WHERE table_name = @tableName OPEN cursCol DECLARE @string nvarchar(3000) –for storing the first half of INSERT statement DECLARE @stringData nvarchar(3000) –for storing theContinue Reading “Insert Statement Script Generator Procedure”