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.
Author |
Topic |
johnsql
Posting Yak Master
161 Posts |
Posted - 2008-03-20 : 10:49:15
|
Hi, I have a stored procedure mySP and I'd like to use a local variable to store the ouput from sp_helptext to that variable. However, I got the error "... Incorrect syntax near "mySP'."declare @v varchar(8000)set @v = sp_helptext mySP Is there is better way to do such and to avoid the error?Thank in advance. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-20 : 10:52:21
|
why do u need to do this? cant you script out the sp from managment studio? expand db-> programability-> yoursp rightclick and select script sp as SELECT to new window.If its sql 2000, go to enterprise manager for this. |
|
|
johnsql
Posting Yak Master
161 Posts |
Posted - 2008-03-20 : 11:24:17
|
quote: Originally posted by visakh16 why do u need to do this? cant you script out the sp from managment studio? expand db-> programability-> yoursp rightclick and select script sp as SELECT to new window.If its sql 2000, go to enterprise manager for this.
Thanks for quick reply, I'd like to send contenes of 50 different stored to another developer who does not access permission to our database procedures. It is tedious and time-consuming to use EM interface to view output, copy and paste one at a time. So, I just think about writing a script to do such instead using EM user interface.Any other ideas? |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-03-20 : 12:23:03
|
The other thing you could try is : go to export objects , select all the sps you want to script out and it will do it in 1 hitJack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
|
|
johnsql
Posting Yak Master
161 Posts |
Posted - 2008-03-20 : 14:51:53
|
quote: Originally posted by jackv The other thing you could try is : go to export objects , select all the sps you want to script out and it will do it in 1 hitJack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com
Thank you for your reply.Can you give me more details how to do that in EM or QA please? |
|
|
|
|
|