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!

Creating table form another table in different schema throwing error when dynamic sql

user5716448Aug 2 2013 — edited Aug 2 2013

Hi,

Using 11.2.0.3 and have following issue.

Wish to create a table in one schema (b)  using some of data from another schema (b)

If run standalone in sqlplus create works O.K but same sql in dynamic sql block saying table or view does not exist.

Same sql as part of dyanmic sql

{code}

v_sql :='create table new_table as select * from schemab.table_name where ...';

execute immediate (v_sql);

[code}

Other tables work fine.

Any ideas - don't want to have to do grant all on schemaa.table to schema b if can avoid.

Thanks

This post has been answered by John Spencer on Aug 2 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2013
Added on Aug 2 2013
5 comments
715 views