MSSQLSERVER_107
SQL Server 2005
New:
17 November 2008
The select list of the query contains an asterisk (*) that is incorrectly qualified with a column prefix. This error can be returned under the following conditions:
-
The column prefix does not correspond to any table or alias name used in the query. For example, the following statement uses an alias name (
T1) as a column prefix, but the alias is not defined in the FROM clause.
SELECT T1.* FROM dbo.ErrorLog;
-
A table name is specified as a column prefix when an alias name for the table is supplied in the FROM clause. For example, the following statement uses the table name
ErrorLogas the column prefix; however, the table has an alias (T1) defined in the FROM clause.
SELECT ErrorLog.* FROM dbo.ErrorLog AS T1;
If an alias has been provided for a table name in the FROM clause, you can only use the alias to prefix columns from the table.
