I'm not quite sure if this is the correct forum to post this, if not please advise where should I post.
I have 7 databases with same structure, but different data in it, I need to have a query to consolidade some info from all of them in one report, is it possible just in onw script? how should I do it?
thanks,
Marcus
PS: I'm a beguinner in this so I apologize if the question seems stupid, or wrong.
If all the databases are on the same server, you can access tables in other databases using the long name [Database].[Owner (usually dbo)].[Table]. It would look something like SELECT * FROM AdventureWorks.Person.Address .
If the databases are on separate servers, you can use the "linked server" feature.
-Ryan / Kardax
No comments:
Post a Comment