| From: | Wei Weng <wweng(at)kencast(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Comparing two tables of different database |
| Date: | 2009-05-01 16:31:12 |
| Message-ID: | 49FB23D0.10403@kencast.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On 05/01/2009 11:55 AM, John Zhang wrote:
>
> Hi Nicholas,
>
> The query is across database query. dblink is needed for that task.
>
> Hope it helps,
>
> John
>
> On Thu, Apr 30, 2009 at 3:07 PM, Edward W. Rouse
> <erouse(at)comsquared(dot)com <mailto:erouse(at)comsquared(dot)com>> wrote:
>
> Can’t you use this?
>
> select name from database2.sr_1 where name not in (select name
> from database2.pr_1);
>
> My test database VM isn’t running so I can’t test it, but I seem
> to remember that that’s how I did it for a few queries of that
> type. This is assuming the 2 databases are running on the same
> machine, like the way there is template0 as the default and you
> add addition databases to the same ‘instance’. If you are talking
> about 2 different database servers, then I have no idea.
>
> Edward W. Rouse
>
How do you formulate the query using dblink?
Thanks
Wei
| From | Date | Subject | |
|---|---|---|---|
| Next Message | M.P.Dankoor | 2009-05-02 10:16:41 | Re: Comparing two tables of different database |
| Previous Message | John Zhang | 2009-05-01 15:55:24 | Re: Comparing two tables of different database |