SELECT 'update '+ so.name+' set '+sc.name+'= '''' where '+sc.name+' is null '
FROM sysobjects so
JOIN syscolumns sc ON so.id = sc.id
JOIN systypes st ON sc.xtype=st.xtype
where so.type = 'U'
and st.name in('nvarchar','int')
and so.name = 'TableName'
FROM sysobjects so
JOIN syscolumns sc ON so.id = sc.id
JOIN systypes st ON sc.xtype=st.xtype
where so.type = 'U'
and st.name in('nvarchar','int')
and so.name = 'TableName'
No comments:
Post a Comment