Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select on multiple servers

Status
Not open for further replies.

xenology

Programmer
May 22, 2002
51
US
I'm guessing I'm not searching on the right keywords but I can't find any information on how to accomplish this. I'd appreciate any point in the right direction or links to any documents.

I have a production POSTGRES database on one server and a development version on another. What/how do I query from both databases in the same query? (i.e. Microsoft SQLServer is "linked servers")

SELECT p.* FROM production.database.table p WHERE p.id NOT IN (SELECT d.id FROM development.database.table d);

Using:
PostgreSQL 8.2.6 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)

Thanks!!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top