My Oracle Support Banner

ORA-20001/ORA-1446 Happens When Try to Select ROWID Using UNION ALL  (Doc ID 2323557.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Application Express (formerly HTML DB) - Version 4.2.5.00.08 and later
Information in this document applies to any platform.

Symptoms

 In an APEX interactive report, if describe SQL including UNION ALL in the region/source field, he 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 the DEPT 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 DEPT

 SELECT ROWID, DNAME FROM DEPT WHERE DEPTNO = '10'
 UNION ALL
 SELECT ROWID, DNAME FROM DEPT WHERE DEPTNO = '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


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.