Monday, March 12, 2012

Make a query to different database?

Hello:
I want make a query to different database, but that query
must be a transation, the problem is that I have common
data in one database and other database that utils the
common database, but I dont add some information in the
one data base without check first the common database, to
check existing data on creation and enforce relatioshipd
for replication and so on.
Best Regards.
Owen.Owen
I don't actually see a question here?
If you are getting at how do you tell the difference when
you have the same tables in different databases, you need
to give it a table name that includes the database. You
need to do this anyway if you are accessing multiple
databases even if they are on the same server. (You should
also include table owner.)
Select * from mydatabase.dbo.mytable
Hope this helps
John

No comments:

Post a Comment