Your FOR XML AUTO query uses derived tables that are treated differently in SQL Server 2005 or later compatibility mode than ...