I was wondering if there is a way that we could call 2 different databases in a SQL Stored Procedure?
We have 2 main databases with the same tables. So I am creating a Stored Procedure and would like to call them both and gain access to their tables.
SELECT * FROM CMSN.dbo.PM30600
UNION ALL
SELECT * FROM EMP.dbo.PM30600
Is there a way I can do this?
John-
We have 2 main databases with the same tables. So I am creating a Stored Procedure and would like to call them both and gain access to their tables.
SELECT * FROM CMSN.dbo.PM30600
UNION ALL
SELECT * FROM EMP.dbo.PM30600
Is there a way I can do this?
John-