DatabaseProcApplicationCreatedLinks
sybsystemprocssp_jdbc_getattributes  31 Aug 14Defects Dependencies

1     
2     /** SECTION END: CLEANUP **/
3     
4     create procedure sp_jdbc_getattributes(
5         @attribute_qualifier varchar(32) = NULL,
6         @attribute_owner varchar(32) = NULL,
7         @type_name_pattern varchar(255) = NULL,
8         @attribute_name_pattern varchar(255) = NULL)
9     
10    as
11        declare @empty_string varchar(1)
12    
13        select @empty_string = ''
14    
15        /* Return an empty result set */
16        select
17            TYPE_CAT = convert(varchar, @empty_string),
18            TYPE_SCHEM = convert(varchar, @empty_string),
19            TYPE_NAME = convert(varchar, @empty_string),
20            ATTR_NAME = convert(varchar, @empty_string),
21            DATA_TYPE = convert(int, 0),
22            ATTR_TYPE_NAME = convert(varchar, @empty_string),
23            ATTR_SIZE = convert(int, 0),
24            DECIMAL_DIGITS = convert(int, 0),
25            NUM_PREC_RADIX = convert(int, 0),
26            NULLABLE = convert(int, 2),
27            REMARKS = convert(varchar, @empty_string),
28            ATTR_DEF = convert(varchar, @empty_string),
29            SQL_DATA_TYPE = convert(int, 0),
30            SQL_DATETIME_SUB = convert(int, 0),
31            CHAR_OCTET_LENGTH = convert(int, 0),
32            ORDINAL_POSITION = convert(int, 0),
33            IS_NULLABLE = convert(varchar, @empty_string),
34            SCOPE_CATALOG = convert(varchar, @empty_string),
35            SCOPE_SCHEMA = convert(varchar, @empty_string),
36            SCOPE_TABLE = convert(varchar, @empty_string),
37            SOURCE_DATA_TYPE = convert(smallint, 0)
38        where
39            1 = 2
40    


exec sp_procxmode 'sp_jdbc_getattributes', 'AnyMode'
go

Grant Execute on sp_jdbc_getattributes to public
go
RESULT SETS
sp_jdbc_getattributes_rset_001

DEFECTS
 MEST 4 Empty String will be replaced by Single Space 13
 MGTP 3 Grant to public sybsystemprocs..sp_jdbc_getattributes  
 MUCO 3 Useless Code Useless Brackets in create proc 4
 QPNC 3 No column in condition 39
 VUNU 3 Variable is not used @attribute_qualifier 5
 VUNU 3 Variable is not used @attribute_owner 6
 VUNU 3 Variable is not used @type_name_pattern 7
 VUNU 3 Variable is not used @attribute_name_pattern 8
 MRST 2 Result Set Marker 16
 MTR1 2 Metrics: Comments Ratio Comments: 3% 4
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 1 = 0dec - 1exi + 2 4
 MTR3 2 Metrics: Query Complexity Complexity: 5 4

DEPENDENCIES