DatabaseProcApplicationCreatedLinks
sybsystemprocssp_drv_getsortorder  14 déc. 14Defects Propagation Dependencies

1     
2     
3     CREATE OR REPLACE PROCEDURE sp_drv_getsortorder
4     as
5         declare @id int
6         SELECT @id = id FROM master.dbo.syscharsets
7         where id = (SELECT value FROM master.dbo.sysconfigures WHERE name like '%default sortorder id%')
8             and description like '%insensitive%'
9         if isnull(@id, 0) = 0
10        begin
11            SELECT @id = 0
12        end
13        SELECT @id
14    


exec sp_procxmode 'sp_drv_getsortorder', 'AnyMode'
go

Grant Execute on sp_drv_getsortorder to public
go
RESULT SETS
sp_drv_getsortorder_rset_001

DEFECTS
 MINU 4 Unique Index with nullable columns master..sysconfigures master..sysconfigures
 QTYP 4 Comparison type mismatch Comparison type mismatch: tinyint vs int 7
 QTYP 4 Comparison type mismatch tinyint = int 7
 MAW1 3 Warning message on %name% master..syscharsets.id: Warning message on syscharsets 6
 MAW1 3 Warning message on %name% master..syscharsets.id: Warning message on syscharsets 7
 MGTP 3 Grant to public master..syscharsets  
 MGTP 3 Grant to public master..sysconfigures  
 MGTP 3 Grant to public sybsystemprocs..sp_drv_getsortorder  
 QAFM 3 Var Assignment from potentially many rows 6
 QNAM 3 Select expression has no name @id 13
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: syscharsets.csyscharsets unique clustered
(id, csid)
Intersection: {id}
7
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysconfigures.csysconfigures unique clustered
(name, parent, config)
Intersection: {name}
7
 MRST 2 Result Set Marker 13
 MSUB 2 Subquery Marker 7
 MTR1 2 Metrics: Comments Ratio Comments: 0% 3
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 4 = 3dec - 1exi + 2 3
 MTR3 2 Metrics: Query Complexity Complexity: 12 3

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_drv_getsortorder_rset_001 
reads table master..syscharsets (1)  
reads table master..sysconfigures (1)