Solved

How to get data from view for 2 orgs simultanously

Posted on 2013-01-09
2
572 Views
Last Modified: 2013-01-21
begin
fnd_client_info.set_org_context(1077);
end;

select * from oe_order_headers_v


now i want the data for org_id=104

any idea this is oracle applications question
0
Comment
Question by:pardeshirahul
2 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 38761077
I'm not an apps person so cannot say for sure if there is a better way to set multiple contexts but a purely database solution may be a global temporary table (GTT).

create a global temp table that mirrors oe_order_headers_v once:
create global temporary table gt_oe_order_headers_v
as select * from oe_order_headers_v where 1=2;

Then set each context and insert into the GTT then select from that?

exec fnd_client_info.set_org_context(1077);
insert into gt_oe_order_headers_v (select * from oe_order_headers_v);

exec fnd_client_info.set_org_context(104);
insert into gt_oe_order_headers_v (select * from oe_order_headers_v);

select * from gt_oe_order_headers_v;
0
 
LVL 6

Expert Comment

by:Javier Morales
ID: 38761944
Please, may you clarify your question?

Many thanks in advance,
Javier
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question