Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: With statement alias problem/10g
Further to previous postings, I have further confirmation that the issue initially documented is not priv related. The following query, performed two slightly different ways, cleanly shows one working whereas the other does not.
Regards
Mike
TESSELLA Michael.OShea_at_tessella.com
__/__/__/ Tessella Support Services plc
__/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England
__/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301
www.tessella.com Registered in England No. 1466429
SQL> SQL> SQL> SQL> CONN USER1/USER1
SQL> SQL> SQL> CREATE OR REPLACE VIEW testView3 AS2 WITH
5 SELECT COUNT(*) X 6 FROM account.orgs
View created.
SQL> SQL> SQL> CREATE OR REPLACE VIEW testView4 AS 2 SELECT testAlias.X 3 FROM ( 4 SELECT COUNT(*) X 5 FROM account.orgs 6 ) testAlias;
View created.
SQL>
SQL> GRANT SELECT ON testView3 TO USER2;
Grant succeeded.
SQL> GRANT SELECT ON testView4 TO USER2;
Grant succeeded.
SQL> SQL> SQL> SQL> SQL> CONN USER2/USER2
*
ERROR at line 2:
ORA-00942: table or view does not exist
SQL>
SQL> SELECT *
2 FROM USER1.testView4;
X
5745
SQL> SELECT * FROM V$VERSION; BANNER
![]() |
![]() |