Hi,
I would like to know if it's possible to create a procedure, where we pass 2 arguments (the databases where the search must be done) and how to use those parameters in select clause
What I would like to know is if it's possible something like:
create proc dbo.uspMySearch
(
@database1 nvarchar(50),
@database2 nvarchar(50)
)
as
set nocount on
select *
from @database1.dbo.table1
UNION
select *
from @database2.dbo.table1
Without using dymanic SQL.
muek