ORA-20001, ORA-1446 Happens When Try to Select ROWID Using UNION ALL
(Doc ID 2323557.1)
Last updated on FEBRUARY 26, 2023
Applies to:
Oracle Application Express (APEX) - Version 4.2.5.00.08 and laterOracle Database Cloud Exadata Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
In an APEX interactive report (IR), if describe SQL including UNION ALL in the region/source field, the following error occurs when executed:
SELECT ROWID, MISE_C FROM TABLE_A WHERE MISE_C = 'aaaa'
UNION ALL
SELECT ROWID, MISE_C FROM TABLE_A WHERE MISE_C = 'bbbb'
When executed, the following error occurred.
ORA-20001: get_dbms_sql_cursor error ORA-1446: cannot select ROWID from, or
sample, a view with DISTINCT, GROUP BY, etc.
Steps to Reproduce with a SAMPLE table
From the application:
1. Create page
2. Select the report and press the Next button
3. Select interactive report and press next button
4. Leave the default value and press the Next button
5. Leave the default value (do not use tab), press the next button
6. In the input column of the SQL SELECT statement, write the SELECT statement as described previously, and press the next button.
e.g using table TABLE_A
SELECT ROWID, <COLUMN_NAME> FROM <TABLE_A> WHERE <COLUMN_NAME> = '10'
UNION ALL
SELECT ROWID, <COLUMN_NAME> FROM <TABLE_A> WHERE <COLUMN_NAME> = '30'
7. When running above page, the error occurs:
ORA-20001: get_dbms_sql_cursor error ORA-1446: cannot select ROWID from, or
sample, a view with DISTINCT, GROUP BY, etc.
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! |
In this Document
Symptoms |
Cause |
Solution |
References |