Subject | System table question |
---|---|
Author | mp527 |
Post date | 2004-02-25T14:17:20Z |
Hi,
I created a stored proc that has a blob defined as so:
BLOB_IN BLOB SUB_TYPE 1 SEGMENT SIZE 80
I then want to pull in the params from the system tables with the
following:
select p.rdb$parameter_name,
p.rdb$parameter_type,
t.rdb$type_name,
f.rdb$field_length,
f.rdb$field_type,
f.rdb$field_scale,
f.rdb$field_sub_type,
f.rdb$field_precision
from rdb$procedure_parameters p, rdb$fields f, rdb$types t
where p.rdb$field_source=f.rdb$field_name and
p.rdb$procedure_name='TEST_PROCEDURE' and
f.rdb$field_type=t.rdb$type and
t.rdb$field_name='RDB$FIELD_TYPE'
This gives me all the info I need except for the blob segment size,
I can't seem to find that one.
Also wondering why when you have a numeric field it's scale comes
back as a -2 when it's defined as:
NUMERIC_IN NUMERIC(15,2)
I created a stored proc that has a blob defined as so:
BLOB_IN BLOB SUB_TYPE 1 SEGMENT SIZE 80
I then want to pull in the params from the system tables with the
following:
select p.rdb$parameter_name,
p.rdb$parameter_type,
t.rdb$type_name,
f.rdb$field_length,
f.rdb$field_type,
f.rdb$field_scale,
f.rdb$field_sub_type,
f.rdb$field_precision
from rdb$procedure_parameters p, rdb$fields f, rdb$types t
where p.rdb$field_source=f.rdb$field_name and
p.rdb$procedure_name='TEST_PROCEDURE' and
f.rdb$field_type=t.rdb$type and
t.rdb$field_name='RDB$FIELD_TYPE'
This gives me all the info I need except for the blob segment size,
I can't seem to find that one.
Also wondering why when you have a numeric field it's scale comes
back as a -2 when it's defined as:
NUMERIC_IN NUMERIC(15,2)