HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 8  System Catalog

System.ProcResult

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

SYSTEM.PROCRESULT contains information about the result columns in procedure result sets for procedures returning results of a single format. Such procedures are created using the WITH RESULT clause.

SYSTEM.PROCRESULT is initially empty, and is updated whenever ALLBASE/SQL processes a CREATE PROCEDURE statement including the WITH RESULT clause, or a DROP PROCEDURE or TRANSFER OWNERSHIP statement specifying such a procedure.

If a TRANSFER OWNERSHIP is done on the procedure, the owner field in this view is updated with the Name of the new owner.

Table 8-27 System.ProcResult

NAME Type Length Description
PROCEDURECHAR20Name of the procedure
OWNERCHAR20Owner of the procedure
RESULTNUMINTEGER4Number of the procedure result column
LENGTHINTEGER4Maximum length of the result column if TYPECODE is 3 (VARCHAR), 9 (NATIVE VARCHAR), or 14 (VARBINARY) or number of bytes in the result column for all other data types
TYPECODESMALLINT2

Data type of the result column:

0

for INTEGER or SMALLINT (these two are distinguished by the LENGTH field)

1

for BINARY

2

for CHAR (ASCII only)

3

for VARCHAR (ASCII only)

4

for FLOAT or REAL (these two are distinguished by the LENGTH field)

5

for DECIMAL

6

for TID (for ALLBASE/SQL use only)

7

reserved

8

for NATIVE CHAR

9

for NATIVE VARCHAR

10

for DATE

11

for TIME

12

for DATETIME

13

for INTERVAL

14

for VARBINARY

15

for LONG BINARY

16

for LONG VARBINARY

NULLSSMALLINT2

Nullability:

0

if the result column cannot contain null values

1

if the result column can contain null values

PRECISIONSMALLINT2Number of significant decimal or binary digits in the number (excluding the sign and the decimal point)
SCALESMALLINT2Number of digits after the decimal point
LANGUAGEIDSMALLINT2Code for the language of this column. Run NLUTIL.PUB.SYS to display a complete list of native languages and codes for your system. A value of -1 means not applicable (for non-character type columns)

 

Example

   select procedure, owner, resultnum, length from system.procresult;

   --------------------+--------------------+-----------+-----------

   PROCEDURE           |OWNER               |RESULTNUM  |LENGTH

   --------------------+--------------------+-----------+-----------

   PROCESS12           |MANUFDB             |          1|         30

   PROCESS12           |MANUFDB             |          2|         20



   ---------------------------------------------------------------------------

   Number of rows selected is 2

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>, or e[nd] >



   select typecode, nulls, precision, scale, languageid from system.procresult;

   --------+------+---------+------+----------

   TYPECODE|NULLS |PRECISION|SCALE |LANGUAGEID 

   --------+------+---------+------+----------

          0|     0         5|     0|        -1

          2|     1|        0|     0|         0



   ---------------------------------------------------------------------------

   Number of rows selected is 2

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>, or e[nd] >


Feedback to webmaster