Invalid column name '%.*ls'.

Error Message:
Msg 207, Level 16, State 3, Line 1
Invalid column name ‘%.*ls’.

Severity level:
16.

Description:
This error message appears when you reference a column in the SELECT list that SQL Server cannot find in any table in the FROM clause.

Consequences:
The SQL statement cannot be parsed and further execution is stopped.

Resolution:
Error of the Severity level 16 are generated by the user and can be fixed by the SQL Server user.

Versions:
All versions of SQL Server.

Example(s):
SELECT Order_ID
  FROM Northwind..Orders
 
SELECT c2
  FROM
   (SELECT 1 UNION ALL
    SELECT 2 UNION ALL
    SELECT 3) AS t (c1)

Remarks:
Very often a typo is the root cause of this error. You need to check the column name displayed in the message to see if it corresponds to a column in (any) table(s) in the FROM clause.

]]>

Leave a comment

Your email address will not be published.