Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Keyword "Text" from sp_helptext

Author  Topic 

amitmnagarwal
Starting Member

15 Posts

Posted - 2009-03-14 : 05:39:50
When we run sp_helptext stored procedure name, then along with the content of the sp it also returns you the Keyword "Text" and a full commented line.

Is there a way to avoid generating the keyword "Text" just above the content of the SP

This is the Column header of the Output.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-03-14 : 08:16:04
Why do you need to remove it?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-14 : 09:04:06
You can select from sql_modules if you want the procedure text only.
Do you need this for saving the procedure code as a file?
See http://weblogs.sqlteam.com/peterl/archive/2008/10/24/How-to-script-out-all-your-objects-one-per-file.aspx


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-03-16 : 00:42:16
or http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/13/script-out-procedures-and-functions-part-2.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -