Hey if the two databases are on the same server its just simply dong like so
SELECT col1, col2, col3 FROM Database1.Schema1.Table1
SELECT col1, col2, col3 FROM Database2.Schema2.Table2
And remember to union you must seklect the same numbetr of columns from both and the columns must be the same datatype.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)