Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any simple way to get procedure full code?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01336897
Message ID:
01337539
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
Naomi,

Please take a look at SP_HELPTEXT system stored procedure, it should return the whole SP as recordset.

Regards,

Zoran


>Hi everybody,
>
>With this code
>
>
>declare @LongName varchar(max)
>--set @LongName = ''
>--
>--select @LongName = @LongName + ' ' + ISNULL(FirstName,'') from Registration
>--select @LongName as LongName
>set @LongName = ''
>select name from sys.procedures order by name
>SELECT @LongName = @LongName + char(13) + OBJECT_DEFINITION(OBJECT_ID) from sys.procedures where Name Like 'Registration%'
>print @LongName
>
>I only get the first N number of lines. Is there a way to get whole code of my procedures into some convenient text format without opening each one using SSMS?
>
>Thanks a lot in advance.
Previous
Reply
Map
View

Click here to load this message in the networking platform