pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fredrick Bartlett <palmtreefrb@earthlink.net>
To: Indraneel Majumdar <indraneel@www.cdfd.org.in>
Cc: pgsql-sql@postgresql.org
Subject: Re: Select between two databases
Date: Sun, 24 Sep 2000 08:18:53 -0700
Message-ID: <39CE1B5D.B216E84F@earthlink.net> (raw)
References: <Pine.SGI.3.96.1000924171306.91135C-100000@www.cdfd.org.in>

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@123india.com  #
> # Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
> # Centre for DNA Fingerprinting and Diagnostics,                         #
> # Hyderabad, India - 500076                                              #
> `************************************************************************/




view thread (4+ messages)  latest in thread

Message-ID: <39CE1B5D.B216E84F@earthlink.net>
Permalink:  ../39CE1B5D.B216E84F@earthlink.net/
Also on:    postgresql.org/message-id/39CE1B5D.B216E84F@earthlink.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: palmtreefrb@earthlink.net, indraneel@www.cdfd.org.in
  Subject: Re: Select between two databases
  In-Reply-To: <39CE1B5D.B216E84F@earthlink.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox