My Oracle Support Banner

RDBPROD: %SQL-F-UNSDATXPR, Unsupported Date Expression if Used in CASE Statement (Doc ID 107859.1)

Last updated on AUGUST 03, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version 7.0.4 to 7.0.9 [Release 7.0]
HP OpenVMS VAX
HP OpenVMS Alpha
HP OpenVMS Itanium

Symptoms

The condition:

field = DATE '1858-11-17'

works when used in a SELECT statement but does not work when used as part of a CASE statement in a view definition. When used as part of a CASE statement in a view definition the following error occurs:

%SQL-F-UNSDATXPR, Unsupported date expression

Example:

-- This SELECT statement works (TEST_DATE = DATE '1858-11-17')

SQL> SELECT * FROM TABLE_1
cont> WHERE TEST_DATE = DATE '1858-11-17';

-- The same syntax used in a CASE condition when defining a view does not work:

SQL> CREATE VIEW TEST_VIEW
cont> (TEST_DATE)
cont> AS SELECT
cont> CASE
cont> WHEN (A.TEST_DATE = DATE '1858-11-17') THEN NULL
cont> ELSE A.TEST_DATE
cont> END
cont> FROM TABLE_1 AS A;

%SQL-F-UNSDATXPR, Unsupported date expression

 

Cause

To view full details, 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 a vibrant support community of peers and Oracle experts.