RDBPROD: CASE has different datatype in 7.1 compared to 7.0 (Doc ID 824114.1)

Last updated on AUGUST 05, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version 7.1 and later
HP OpenVMS Alpha
HP OpenVMS Itanium

Symptoms

Consider these definitions:

create function MYFUNC (
in CHAR (2) by descriptor)
returns CHAR (4) by descriptor
language SQL;
external
name "MYFUNC"
location 'MYLOCATION'
with SYSTEM logical_name translation
language FORTRAN
GENERAL parameter style
not variant
;

create table MYTAB ( MYCOL CHAR (2) );


create view MYTAB_V
(COLA1,
COLA2) as
(select
MYFUNC( C1.MYCOL ) ,
case when
( C1.MYCOL >= '' ) THEN MYFUNC(C1.MYCOL) end from MYTAB C1);

In Rdb 7.0 the following is displayed:

SQL> show view(col) MYTAB_V;
Information for table MYTAB_V

Columns for view MYTAB_V:
Column Name Data Type Domain
----------- --------- ------
COLA1 CHAR(4)
COLA2 CHAR(4)

In Rdb 7.1.5.2 and Rdb 7.2 the following is displayed:

SQL> show view(col) MYTAB_V;
Information for table MYTAB_V

Columns for view MYTAB_V:
Column Name Data Type Domain
----------- --------- ------
COLA1 CHAR(4)
COLA2 VARCHAR(4)


The datatype of the CASE expression has changed from CHAR(4) to VARCHAR(4)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms