sql-generate-insert icon indicating copy to clipboard operation
sql-generate-insert copied to clipboard

Added the ability to include or exclude specific columns.

Open njregenwether opened this issue 6 years ago • 0 comments

Added two parameters allowing you to include or exclude columns by name.

Example

-- This ensures that ID, Name, and DateAdded are included but DateAdded, Date Changed, AddedByID, and ChangedByID are not. 
-- If a row is included in both lists, it will be excluded. 

EXECUTE dbo.GenerateInsert @ObjectName = N'dbo.MYTABLE', @ColumnExclusion = 'DATEADDED,DATECHANGED,ADDEDBYID,CHANGEDBYID', @COLUMNINCLUSION='ID,NAME,DATEADDED';

njregenwether avatar Oct 01 '19 20:10 njregenwether