_ALL or fnd_client_info.set_org_context(org_id); (merged 3 by VK) [message #451909] |
Sun, 18 April 2010 20:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
chandramatta
Messages: 15 Registered: January 2010
|
Junior Member |
![chandra.matta](/forum/theme/orafaq/images/google.png)
|
|
Hi All,
I have question on multi-org tables.
When selecting data from multi-org tables inside pl/sql code,
which is right way or recomended way by oracle ?
- Is it use _ALL tables and put additional condition in WHERE clause for tab1.org_id = <Org ID>
select trx.trx_number into v_trx
from ra_customer_trx_all trx, ra_customer_trx_lines_all trxl
where trx.customer_trx_id = trxl.customer_trx_id
and trx.org_id = p_org_id
or
- set org context at the begining of procedure and proceed with no additional condition for <org id> in WHERE clause..
like below..
begin
fnd_client_info.set_org_context(p_org_id);
select trx.trx_number
into v_trx
from ra_customer_trx trx, ra_customer_trx_lines trxl
where trx.customer_trx_id = trxl.customer_trx_id
end ;
I know it's silly.. but wanted to find out what is oracle recomended way of doing it.
|
|
|
|
|