DatabaseProcApplicationCreatedLinks
sybsystemprocssp_helptext_usage  31 Aug 14Defects Dependencies

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    create procedure sp_helptext_usage
12    as
13        begin
14            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 @procname
30    
31        end -- }
32    


exec sp_procxmode 'sp_helptext_usage', 'AnyMode'
go

Grant Execute on sp_helptext_usage to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_helptext_usage  
 MUCO 3 Useless Code Useless Begin-End Pair 13
 MDYE 2 Dynamic Exec Marker exec @procname 29
 MTR1 2 Metrics: Comments Ratio Comments: 30% 11
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 1 = 0dec - 1exi + 2 11
 MTR3 2 Metrics: Query Complexity Complexity: 13 11

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_showtext  
   calls proc sybsystemprocs..sp_showtext_output  
      reads table tempdb..#syscomments (1) 
      calls proc sybsystemprocs..sp_showtext_sproc_tagline  
         calls proc sybsystemprocs..sp_help_params  
            calls proc sybsystemprocs..sp_autoformat  
               reads table master..systypes (1)  
               calls proc sybsystemprocs..sp_namecrack  
               calls proc sybsystemprocs..sp_autoformat  
               reads table master..syscolumns (1)  
               reads table tempdb..systypes (1)  
               read_writes table tempdb..#colinfo_af (1) 
               reads table tempdb..syscolumns (1)  
            read_writes table tempdb..#helpproc (1) 
            reads table master..spt_values (1)  
            reads table sybsystemprocs..syscolumns  
            reads table master..sysmessages (1)  
            reads table sybsystemprocs..systypes  
            reads table sybsystemprocs..sysxtypes  
      reads table sybsystemprocs..syscomments  
      calls proc sybsystemprocs..sp_getmessage  
         reads table master..sysmessages (1)  
         reads table sybsystemprocs..sysusermessages  
         reads table master..syslanguages (1)  
         calls proc sybsystemprocs..sp_validlang  
            reads table master..syslanguages (1)  
      calls proc sybsystemprocs..sp_showtext_check_print  
      calls proc sybsystemprocs..sp_showtext_print_line  
      calls proc sybsystemprocs..sp_getopts  
      calls proc sybsystemprocs..sp_showtext_usage  
         calls proc sybsystemprocs..sp_getmessage  
   calls proc sybsystemprocs..sp_showtext_usage  
   reads table master..syscurconfigs (1)  
   calls proc sybsystemprocs..sp_namecrack  
   reads table master..syscomments (1)  
   reads table sybsystemprocs..sysobjects  
   reads table sybsystemprocs..syscomments  
   writes table tempdb..#syscomments (1) 

CALLERS
called by proc sybsystemprocs..sp_helptext