PARSE_SCHEMA_VERSION - Perceptive Content Database IN_DB_UTIL Package for Oracle Server - Foundation 24.1 - Foundation 24.1 - Ready - Perceptive Content - external

Perceptive Content Database IN_DB_UTIL Package for Oracle Server

Platform
Perceptive Content
Product
Perceptive Content Database IN_DB_UTIL Package for Oracle Server
Release
Foundation 24.1
License

The PARSE_SCHEMA_VERSION stored procedure will parse the current INUSER schema version and return schema specific attributes to populate variables with for conditional processing or for dynamic SQL generation.The PARSE_SCHEMA_VERSION procedure will return the current INUSER base schema version (without the type), and the schema type, and the default character datatype.For example, if the current INUSER schema version is 7.7.0.0a then the procedure will return the following values:

  • SCHEMA_BASE will be the base schema version of ‘7.7.0.0’.
  • SCHEMA_TYPE will be the schema type of ‘a’, signifying Advanced Filegroup schema configuration.
  • CHAR_DATATYPE will be the default character datatype for the schema of ‘VARCHAR2’.
Parameter Description
IN_SCHEMA Type: INPUT
Datatype: VARCHAR2(40)
Default Value: GET_IN_DB_SCHEMA_VERSION
Description The schema version number to parse.

If NULL then the current schema version will be fetched using the GET_IN_DB_SCHEMA_VERSION function.

SCHEMA_BASE Type: OUTPUT
Datatype: VARCHAR2(40)
Default Value: NULL
Description The base schema version without the schema type designation.
SCHEMA_TYPE Type: OUTPUT
Datatype: VARCHAR2(2)
Default Value: NULL
Description Indicates the schema type.
Options

Empty string for standard, ANSI schema type

a = Advanced Filegroup Configuration

CHAR_DATA_TYPE Type: OUTPUT
Datatype VARCHAR2(9)
Default Value: NULL
Description The default character datatype for the schema. Unicode is not currently supported on Oracle so this will always be VARCHAR2.

Example

SET SERVEROUTPUT ON;


DECLARE
V_SCHEMA_BASE VARCHAR2(40);
V_SCHEMA_TYPE VARCHAR2(2);
V_CHAR_DATATYPE VARCHAR2(9);
BEGIN 
  IN_DB_UTIL.PARSE_SCHEMA_VERSION(IN_DB_UTIL.GET_IN_DB_SCHEMA_VERSION, V_SCHEMA_BASE,
V_SCHEMA_TYPE, V_CHAR_DATATYPE); 


DBMS_OUTPUT.PUT_LINE('SCHEMA_BASE = '||V_SCHEMA_BASE); 
DBMS_OUTPUT.PUT_LINE('SCHEMA_TYPE = '||V_SCHEMA_TYPE); 
DBMS_OUTPUT.PUT_LINE('CHAR_DATATYPE = '||V_CHAR_DATATYPE);
END;
/

Example Output

SCHEMA_BASE = 7.7.0.0
SCHEMA_TYPE =
CHAR_DATATYPE = VARCHAR2