sp_helptext does not allow : sp_helptext OtherDB.dbo.spSelT - SQL Server

Hi,

I have my stored procedure "spSelT" in "OtherDB" database. And now i cannot able to write:

sp_helptext OtherDB.dbo.spSelT

Is there any way that i can wite like above ? Modify the above command if needed.

And if i want to do for other than "dbo" schema then how to write it ?

sp_helptext dbo.spSelTest  // returns error

Please provide the command for that also.

Thanks
milani_lucieAsked:
Who is Participating?
 
JestersGrindCommented:
Also to answer your second question, put the object inside single quotes.

Greg

0
 
JestersGrindCommented:
Try putting your database and schema before sp_helptext like this.

EXECUTE OtherDB.dbo.sp_helptext 'spSelT'

Greg

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.