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.は、SQL Serverのリンク接続
'declare @dbName varchar(50)= 'DBNAME';' Declareローカル変数 – Viki888
動的SQLのみです。 –
既に宣言しました – SANJOG