I am using sp_helptext to list some stored procs instead of going through the ui. I am having a problem with the naming convention we have chosen to adopt.
I have a stored proc nameed [Test.FooBar].
Execute sp_helptext [Test.FooBar]
Msg 15009, Level 16, State 1, Procedure sp_helptext, Line 54 The object 'Test.FooBar' does not exist in database 'Foo' or is invalid for this operation.
When I change the exceut statement to be fully qualified i get a different error
Execute sp_helptext [Foo].[dbo].[Test.FooBar]
Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '.'.
Can one someone point me in the right direction to fix this. Thank you very much.