sp;then 'case when '+a.name+' is null then ''null'' else '+'convert(varchar(22),'+a.name +')'+' end'
384
385
when a.xtype =239 then 'case when '+a.name+' is null then ''null'' else '+'''''''''+'+'replace('+a.name+','''''''','''''''''''')' + '+'''''''''+' end'
386
387
when a.xtype =108 then 'case when '+a.name+' is null then ''null'' else '+'convert(var