DatabaseFunctionApplicationCreatedLinks
sybsystemprocssp_f_getbigint  14 déc. 14Defects Propagation Dependencies

1     create function sp_f_getbigint(
2         @fromstr varchar(2048)
3         , @substr varchar(256)
4         , @valuesep char(1) = '='
5         , @fieldsep char(1) = ','
6     ) returns bigint
7     as
8         begin
9             declare @retval bigint
10                , @value varchar(1024)
11    
12            set @retval = 0
13    
14            -- Get the value of the field in the form of a string
15            set @value = dbo.sp_f_getval(@fromstr, @substr, @valuesep, @fieldsep)
16    
17            -- Convert it into bigint and return the value
18            if (isnumeric(@value) = 1)
19            begin
20                set @retval = convert(bigint, @value)
21                if (@@error != 0)
22                    set @retval = NULL
23            end
24    
25            return @retval
26        end
27    

DEFECTS
 MUCO 3 Useless Code Useless Begin-End Pair 8
 MUCO 3 Useless Code Useless Brackets 18
 MUCO 3 Useless Code Useless Brackets 21
 MTR1 2 Metrics: Comments Ratio Comments: 12% 1
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 3 = 2dec - 1exi + 2 1
 MTR3 2 Metrics: Query Complexity Complexity: 10 1

DEPENDENCIES