A colleague told me to query for a SQL error ORA-01446
Sql> Select user_id,
2 Dbms_rowid.rowid_relative_fno (ROWID) Rel_fno,
3 Dbms_rowid.rowid_block_number (ROWID) Blockno,
4 Dbms_rowid.rowid_row_number (ROWID) rowno
5 from User_accesslog
6 where user_id = 57633213;
DBMS_ROWID.ROWID_RELATIVE_FNO (ROWID) Rel_fno,
*
ERROR at line 2:
Ora-01446:cannot Select ROWID from, or sample, a view with DISTINCT, GROUP by,
etc.
[Oracle@localhost ~]$ oerr ora 1446
01446, 00000, "cannot select ROWID from, or sample, a view with DISTINCT, GROUP by, etc."
*cause:
*action:
+ + + I checked the SQL, and there was no spelling or formatting errors, and my colleague told me that SQL was able to check
+ + + feel Strange
+ + + from the wrong literal meaning, you can probably see that if there is distinct in the view, the GROUP by and other operations, is not supported by the ROWID query
Check for User_accesslog, it is really a view, and the view contains the group by action
Group BY A.user_id,a.type,a.ip_address;
+ + + re-confirm that this view has recently been changed, increasing the total number of group statistics
If you remove the function of this grouping statistic, the query is not a problem
Sql> Select user_id,
2 Dbms_rowid.rowid_relative_fno (ROWID) Rel_fno,
3 Dbms_rowid.rowid_block_number (ROWID) Blockno,
4 Dbms_rowid.rowid_row_number (ROWID) rowno
5 from User_accesslog
6 where user_id = 57633213;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.