>create table #test (dateFld datetime default '19000101', charField varchar(20) default 'Test', numField int default 10) > >declare @dt datetime = null, @ch varchar(20) = null, @nm int =15 > >declare @sql nvarchar(max) > >set @sql = N'INSERT INTO #Test (dateFld, charField, numField) >VALUES (' + case when @dt IS NULL then 'DEFAULT' else '@dt' END + >', ' + case when @ch IS NULL then 'DEFAULT' else '@ch' end + >', ' + case when @nm is NULL then 'DEFAULT' else '@nm' end + ')' > >execute sp_executeSQL @sql, N'@dt datetime, @ch varchar(20), @nm int', @dt = @dt,@ch=@ch, @nm=@nm > >select * from #testCan't you then modify your dynamic Insert to skip the fields if their are null? And skip the value if null in the Values part?