Home Forums SQL Server 7,2000 T-SQL store output of sp_helptext to local variable RE: store output of sp_helptext to local variable
Ralph Curry
SSC Enthusiast
Points: 167
More actions
March 20, 2008 at 3:01 pm
#792261
It's not pretty, but you might try something like this:
declare @t table(line varchar(8000))
insert @t exec sp_helptext 'myProc'
declare @ddl varchar(8000)
select @ddl = ''
select @ddl = @ddl + line
from @t
print @ddl