Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: query to join two tables in 2 different Oracle schema

Re: query to join two tables in 2 different Oracle schema

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Fri, 08 Oct 2004 12:19:13 -0500
Message-ID: <1097255900.6NgvlwetXNJwsjMAYk3wHA@teranews>


.Usually I can spot homework, but by including the pseudo-code the poster may have caused by student radar to fail..

"Alan" <alan_at_erols.com> wrote:

>Turk- it's a homework assignment.
>
>
>"Turkbear" <john.g_at_dot.spamfree.com> wrote in message
>news:1097176920.yB2oHMJzRsN3yajM6tCHmw_at_teranews...
>> harryooopotter_at_hotmail.co_ (Harry) wrote:
>>
>> >[x-post to c.l.p.m]
>> >
>> >At my work we have an Oracle 9 database sitting on a W2K server.
>> >Therre are two different schema, one for overall info and the other
>> >just for storing reports.
>> >
>> >schema A: a table "study" with study_id, etc.
>> >
>> >schema B: a table "report" with study_id, etc.
>> >
>> >How can I made a query, in SQL Plus (or PL/SQL, or Perl script)
>> >that can join the table together?
>> >
>> >pseduo code:
>> >
>> > select s.study_id, r.report_type
>> > from study s connected to schema A using userid xxx password yyy,
>> > report r connected to schema B using userid ppp password qqq
>> > where s.study_id = r.study_id
>> >
>> >Is it doable?
>> >
>> >TIA
>>
>> Please do not cross-post..
>>
>> If the data is in 2 schemas, as long as the logged in user has rights to
>each schema's tables it is much simpler than you
>> tried..:
>>
>> Select s.study.r.report_type
>> from schemaA.study s, schemaB.report r
>> where s.study_id = r.study_id
>>
>>
>
Received on Fri Oct 08 2004 - 12:19:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US