select @dbName="DBNAME"
select Distributorid from [180.552.528.854,21414].[@dbName].DBO.DistributorMaster where Distributorid =XXXXXX
ERROR: The OLE DB provider "SQLNCLI10" for linked server[180.552.528.854,21414] does not contain the table ""@dbName"."DBO"."DistributorMaster"". The table either does not exist or the current user does not have permissions on that table.
declare @dbName varchar(50) = 'DBNAME';Declare Local variable