Msg 207, Level 16, State 3, Line 1
Invalid column name ‘%.*ls’.
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.
The SQL statement cannot be parsed and further execution is stopped.
Error of the Severity level 16 are generated by the user and can be fixed by the SQL Server user.
All versions of SQL Server.
(SELECT 1 UNION ALL
SELECT 2 UNION ALL
SELECT 3) AS t (c1)
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.