• a mix of parameters and dynamically generated sql statement does the trick... check here for details http://www.xdevsoftware.com/blog/post/Use-Parameters-with-OPENQUERY-in-SQL.aspx

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.