Solved

How to get data from view for 2 orgs simultanously

Posted on 2013-01-09
2
582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

738 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