Hi,
here is a dynamic way for your tsql...
declare @query varchar(4000)
declare @server varchar(50)
declare @error int
set @server = @@servername
set @query = 'SELECT T1.EMPLID,T1.EMPLNAME,T1.EFFECTIVE_DATE
FROM EMPLOYEE.DBO.TBL1 T1
WHERE T1.ORGID = ''TT''
AND...