Re: Select between two databases

From: Fredrick Bartlett <palmtreefrb(at)earthlink(dot)net>
To: Indraneel Majumdar <indraneel(at)www(dot)cdfd(dot)org(dot)in>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Select between two databases
Date: 2000-09-24 15:18:53
Message-ID: 39CE1B5D.B216E84F@earthlink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Not sure if same can be accomplished with different servers.
Try the following for database's on one server, use alias & dot notation...

select a1.colA1 from
myDatabase1.tableA1 a1
where a1.A2 in (select b1.colB1 from myDatabase2.tableB1 b1)

Indraneel Majumdar wrote:

> Hi,
>
> Does any one know how I may select between two databases running on same
> machine or on different machines eg.
>
> select colA1 from tableA1 where colA2 in (select colB1 from tableB1);
>
> here tableA1 and tableB1 are in different databases. The two databases
> might be under the same postmaster or on different machines under
> different postmasters. How do I query both simultaneously? Is it possible?
>
> Thanks,
> Indraneel
>
> /************************************************************************.
> # Indraneel Majumdar ¡ E-mail: indraneel(at)123india(dot)com #
> # Bioinformatics Unit (EMBNET node), ¡ URL: http://scorpius.iwarp.com #
> # Centre for DNA Fingerprinting and Diagnostics, #
> # Hyderabad, India - 500076 #
> `************************************************************************/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2000-09-24 19:46:39 Re: Select between two databases
Previous Message Indraneel Majumdar 2000-09-24 06:21:32 Re: select