Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get data from view for 2 orgs simultanously

Posted on 2013-01-09
2
Medium Priority
?
618 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 2000 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 7

Expert Comment

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

Many thanks in advance,
Javier
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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 setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

604 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