Matthew van Eerde wrote:To me it smells like the internal connection layer is doing something to your command string. Can you attach SQL Profiler to the SQL Server 2000 server to see the exact command that gets run by the app?
It's the (--) comments in SQL2000
--table
--predicate
and so on, with them removed, the query returns fine, I can't say I understand it, but that is the issue.
If you are using 2005 SQL Management Studio you would not see it. Try in 2000 query analyzer.