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)
 Read Out Code of StoredProcedure

Author  Topic 

zachsu
Starting Member

2 Posts

Posted - 2010-11-15 : 10:36:48
hi guys,
I am trying read out and capture a part of the code in a StoredProcedure. Don't know if there are any simple methods?

For example:
In my file SP_001:
"ALTER PROCEDURE [dbo].[SP_001] ( @Prd [smallint] ) AS select ...."

The aim is to get and return the string "select ..."

Thanks in advance !

zach

c# programmer

zachsu
Starting Member

2 Posts

Posted - 2010-11-15 : 13:35:01
I got an answer myself. EXEC sp_helptext 'sp_name'


c# programmer
Go to Top of Page
   

- Advertisement -