var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to Select From different schema's table in stored procedure?
The Sql is
From schema1.Table a, Schema2.Table b
Where a.item_id = b.itme_id
In SQL Plus is Run OK!
But in My StoredProcedure is Wrong!
I try to write sql in my storedprocedure is
From schema1.Table@ora1 a, Schema2.Table@ora2 a
But it also wrong
the procedure's error is "Must Declare identifier schema1.table"
how to select different schema's table in Stored Procedure?
In the procedure, you are using dblinks that you are not using in
sql... Ensure that you have the appropriate grants on the schemas
on the different databases.
Thanks a lot!
I use "Grant Select any table to MyUser" is OK!
But I want Grant only one Schema's all table to myuser, not all Schema's table, how to do?
I don't want "grant select on usr1.table1 to usr2"
and "grant select on usr1.table2 to usr2"
"grant select on usr1.tablen to usr2"
If you are refering to two table in two schemas in the same database you do not have to use a DB link. Instead you can creat a public or private synonym on the other schema table and use the synonym name in the select clause. The synonym shuold have proper privilages granted to the users who execute the procedure.