If the databases are on the same server, you can just reference the table using the three-part name: database.owner.table
SELECT ... FROM mytable
UNION
SELECT ... FROM otherdatabase.ownername.othertable
OTOH, if the other database is on another server, you'll have to create a Linked Server and use that name of the linked server when referencing the other database:
SELECT ... FROM mytable
UNION
SELECT ... FROM linkedservername.otherdatabase.ownername.othertable
-Mike
>I am trying to make a view in SQL server that takes data from two diferent databases. The two tables are exaclty the same and what i need it is a union between them.
>
>The query designer doesn't allow me to do so, so I'm wondering wether this is possible or not.
>
>any clues