Solved

How to get data from view for 2 orgs simultanously

Posted on 2013-01-09
2
568 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 76

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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.

773 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