bsp;else '+'''''''''+'+'replace('+a.name+','''''''','''''''''''')' + '+'''''''''+' end'
404
405
else '''null'''
406
407
end as col,a.colid,a.name
408
409
from syscolumns a where a.id = object_id(@tablename) and a.xtype <>189 and a.xtype <>34 and a.xtype <>35 and a.xtype <>36
410
411
)t order by colid
412
413