Skip to main content
1 of 4
JJS
  • 721
  • 1
  • 5
  • 17

what allows ssms to trade an object name for a string passed to a system procedure

what causes it to be legal for one to pass an object name to the system stored procedure sp_helptext. What mechanism converts the object name to a string?

e.g.

sp_helptext myproc
sp_helptext [myproc]
sp_helptext 'myproc'
sp_helptext 'dbo.myproc'
sp_helptext [dbo.myproc]

-- does not work
sp_helptext dbo.myproc -- Msg 102, Level 15, State 1, Line 2 incorrect syntax near '.'
JJS
  • 721
  • 1
  • 5
  • 17