sql server - Programmatically create stored procedure -
i have meta table , creating stored procedures using t-sql string concatenation.
declare @sql varchar(max) = 'select '; select @sql += ... meta -- select clause select @sql += ... meta -- clause ....
it's hard maintain when stored procedures complex.
is better to
declare @sql xml = (select ... meta xml, auto); -- apply xslt transformation
how xslt in sql server 2008? clr function way? other solution these kind of meta programming in t-sql?
i think xquery should enough purpose.
Comments
Post a Comment