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 2000 Forums
 SQL Server Development (2000)
 sp_helptext Query

Author  Topic 

amitmnagarwal
Starting Member

15 Posts

Posted - 2008-08-21 : 05:44:18
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.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-21 : 05:47:45
quote:
Originally posted by amitmnagarwal

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.


Why does it matter?
Are you trying to copy to a file?

Madhivanan

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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-21 : 06:53:44
quote:
Originally posted by amitmnagarwal

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.


You can get script without text bits by right clicking on procedure and generating script from enterprise manager.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-21 : 07:14:41
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

amitmnagarwal
Starting Member

15 Posts

Posted - 2008-08-21 : 07:29:05
thanks everyone for the replies.

My requirement for elimination of Text word is that when we generate the script of sps via sp_helptext, then we have to ensure that we delete the Text keyword from the script manually, so that the entire script runs smoothly.

Please advice.

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-21 : 08:08:44
quote:
Originally posted by amitmnagarwal

thanks everyone for the replies.

My requirement for elimination of Text word is that when we generate the script of sps via sp_helptext, then we have to ensure that we delete the Text keyword from the script manually, so that the entire script runs smoothly.

Please advice.




Did you go thru the link I posted?

Madhivanan

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

- Advertisement -