Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table or view doesn't exists

UtsavJan 13 2015 — edited Jan 14 2015

Hi All,

I am on Banner

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

My Database OraDB has 5 schemas,

S1,S2,S3,S4,S5

Where S1 has table T1 whose select grant is given to S2,S3 and S4 schema.

Where as S5 Schema has SELECT ANY TABLE grant.

I got a scenario where I am compiling or using (execute immediate) to access Table T1 of S1 schema.

But I got error of Table or view doensn't exists.

So what I did to verify whether the syntax is correct, I've printed SQL_Variable which is holding query before its execution in EXECUTE IMMEDIATE.

This printed SQL execute find in TOAD or in SQLPLUS but when the same variable is executing inside EXECUTE IMMEDIATE I got error

Table or view doesn't exist.

To Keep  crosscheck on this I ran

Executed SQL :   {code } select column_name from S1.T1 {code } in both TOAD and SQLPLUS it ran succesfully but when I placed it inside package it threw error of table or view doesn't exists.


This post has been answered by John Stegeman on Jan 13 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2015
Added on Jan 13 2015
6 comments
958 views