1 2 /*
3 ** sp_helptext_usage
4 **
5 ** Print help/usage information for sp_helptext procedure, with
6 ** useful examples. Help info is generated by default when sp_helptext
7 ** is invoked with no arguments. This then calls into the extended
8 ** sproc, sp_showtext, which will generate its help/usage information.
9 {
10 */11 createproceduresp_helptext_usage12 as13 begin14 declare@procname varchar(12)15 16 print "Usage: sp_helptext [ '@objname' [, @grouping_num] [, ... ] ]"
17 18 print " "
19 print " -- Generate text for a given procedure in a group, use either one of:"
20 print " sp_helptext grouped_proc, 3"
21 print " sp_helptext 'grouped_proc;3'"
22 23 print " "
24 print " -- To generate formatted SQL, use 'showsql' in @printopts, as:"
25 print " sp_helptext sp_helptext, 5, 10, 'showsql'"
26 27 print " "
28 select@procname= 'sp_showtext'
29 exec@procname30 31 end-- }32
exec sp_procxmode 'sp_helptext_usage', 'AnyMode'
go
Grant Execute on sp_helptext_usage to public
go