Why does the below query work in SQL Server 2008, but not in SQL Server 2014?
SELECT sysobj.ects.* FROM sysobjects
Notice how the table name has the dot between sysobj and ects in the SELECT
statement, but the FROM
statement doesn't have the dot. This happens with any table. You can put the dot anywhere in the table name and it will still run the query fine.
On 2014 you will see this error:
The column prefix 'sysobj.ects' does not match with a table name or alias name used in the query.
EDIT: Compatibility mode on the 2008 server is set to SQL Server 2000.