Perdon, OPENQUERY no acepta variables como parametros.
Código SQL:
Ver originalDECLARE @tabla AS CHAR(45)
DECLARE @FchaInfrmcion AS CHAR(8)
DECLARE @Registros BIGINT
SET @Tabla='ffncrdtos'
SET @FchaInfrmcion ='31012009'
SELECT @Registros= total FROM OPENQUERY(localhost,'select count(*) as total from agsa_sarlaft.ffncrdtos')
SELECT @Registros