Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id BB19B9FBFED; Thu, 7 Jun 2007 11:14:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 25733-08; Thu, 7 Jun 2007 11:13:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id 0A8279FBF9F; Thu, 7 Jun 2007 11:13:56 -0300 (ADT) Received: MIR3-FS.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes by MIR3-FS.mir3.com; 07 Jun 2007 07:13:54 -0700 Subject: Re: Query with tables from 2 different databases in Java From: Mark Lewis To: Loredana Curugiu Cc: pgsql-jdbc@postgresql.org, pgsql-novice@postgresql.org In-Reply-To: <1c23c8e70706070708m2f3be6f9o75571fd8a82ee390@mail.gmail.com> References: <1c23c8e70706070708m2f3be6f9o75571fd8a82ee390@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Thu, 07 Jun 2007 07:13:54 -0700 Message-Id: <1181225634.31471.387.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/25 X-Sequence-Number: 17087 On Thu, 2007-06-07 at 17:08 +0300, Loredana Curugiu wrote: > Hi, > > I need a query to use tables from 2 different databases and > that query to be executed from a .java file. What do you recommand? > > Thanks in advance! > > > Regards, > Loredana > Move the data to a single database, or else perform the query manually by pulling back the matching results from each database individually and then stitching them together. -- Mark Lewis