Can anyone suggest how to use local variables in OPENQUERY statements as parameters in the SELECT clause? eg: SELECT * from OPENQUERY(REMOTESERVERNAME,'Select * from table1 where id = @parm1&#39