tags:

views:

37

answers:

2

Possible Duplicate:
Possible to perform cross-database queries with postgres?

I don-t know how to use one table from one database and second table from another databse at the same time or copy data from table in one database to table from another databse. I tried following query:

select * into NewTable from existingdb.dbo.existingTable;

But it doesnt't work.

A: 

In existing table name, specify the full path. that's database name and table table to be copied. In New table also specify the database name and table name or make sure the console is in same database.

Also verify both the tables have same table structure.

Jothi
A: 

What is the exact error message? It would not work if NewTable already exists. Then you should type insert into NewTable select * from ExistingDb.dbo.ExistingTable.

henginy
The exact error is "ERROR: cross-database references are not implemented:" ?!
Z77
Now I see that your question has been asked before:http://stackoverflow.com/questions/46324/possible-to-perform-cross-database-queries-with-postgresThere you can find the answer too.
henginy
Oh yes, thank you indeed
Z77