Seaquel
SQL Server error code

SQL Server error 207

SQL Server raises error 207 at severity 16, which marks a problem with the query or data that you can correct.

Invalid column name '%.*ls'.
Msg207
NameSQ_BADCOL
Severity16
Group0–999

How to fix it

What it means

This query error can be caused by one of the following problems.

The column name is misspelled or the column does not exist in any of the specified tables.

The collation of the database is case-sensitive and the case of the column name specified in the query does not match the case of the column defined in the table. For example, when a column is defined in a table as LastName and the database uses a case-sensitive collation, queries that refer to the column as Lastname or lastname will cause error 207 to return because the column name does not match.

A column alias, defined in the SELECT clause, is referenced in another clause such as a WHERE or GROUP BY clause. For example, the following query defines the column alias Year in the SELECT clause and refers to it in the GROUP BY clause.

In other databases

Source: Database Engine events and errors