It really looks like the problem is caused by the compat level of your "main" database. The odds are that the level is 80 (native for SQL Server 2000). Usually, it happens when the original SQL Server 2000 database is upgraded to 2005. By design, the compat level does not get changed after the upgrade, it has to be done manually. With compat 80 the engine has no way to understand the meaning of the outer apply.
-- check compat level
select
[compatibility_level]
from sys.databases
where name = db_name();
-- if the above returned 80 then set it to native 90
sp_dbcmptlevel main, 90;
go
Hope this helps,
Oleg
Trending Articles
More Pages to Explore .....