September 4, 2009 at 11:30 am
I know I can navigate through object explorer, right-clicking on a stored procedure and script it out. But, is there a quick way to pass a procedure name to another procedure to script it out?
I see the procedure in the routine_definition field in INFORMATION_SCHEMA.ROUTINES, but it looks like it has been optimized as I don'e see any CRLFs. How can I format it so it is more humanly readible?
Thanks...
September 4, 2009 at 1:57 pm
how about sp_helptext 'sp_who2'
September 4, 2009 at 2:14 pm
That is way too simple. It formats it much better than simply looking in the system table, but it still doesn't format it the same way as when I script it out. Strangely, it does format 'sp_who2' and some others correctly, but not all of them.
Is there a setting in SSMS 2005 that would cause it to format differently?
September 5, 2009 at 6:10 am
PRINT OBJECT_DEFINITION(OBJECT_ID(N'master.dbo.sp_helptext', N'P'))
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply