My Oracle Support Banner

ORA-00904 with Pivot Operator After Upgrading Database To 12.2 or Higher (Doc ID 2674664.1)

Last updated on AUGUST 11, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

Upgraded a 11.2 database to 12.2 or higher.

After upgrade, query with Pivot operator gives error:

SELECT
           CASE
               WHEN R1_XXXXX_XXXXX_XXXXX_XXXXX_XXX IS NOT NULL -- Note 30 Characters
               THEN
                   R1_XXXXX_XXXXX_XXXXX_XXXXX_XXX
               ELSE
                   TD_XXXXX_XXXXX_XXXXX_XXXXX_XXX
           END
               AS XXXXX_XXXXX_XXXXX_XXXXX_XXXTD
FROM bug_test
PIVOT
(
    SUM (XXXXX_XXXXX_XXXXX_XXXXX_XXXT) AS XXXXX_XXXXX_XXXXX_XXXXX_XXXT -- Note 29 characters will be prefixed with the TD and R1 making over 30 characters
    FOR (SOMECOL) IN ('TD' AS TD, 'R1' AS R1)
);  

ORA-00904: "XXXXX_XXXXX_XXXXX_XXXXX_XXX": invalid identifier
00904. 00000 - "%s: invalid identifier"

 

 

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.