• Hi Shafat,

    Yes, I have tried OPENQUERY and it does not fix the problem. The sub query that contains the statement works fine but when it is joined to the rest of the query with the WHERE clause it produces the same error.

    Fred