I was getting the same error when creating a view.
Imagine a select query that executes without issue:
select id
from products
Attempting to create a view from the same query would produce an error:
create view app.foobar as
select id
from products
Msg 207, Level 16, State 1, Procedure foobar, Line 2
Invalid column name 'id'.
For me it turned out to be a scoping issue; note the view is being created in a different schema. Specifying the schema of the products
table solved the issue. Ie.. using dbo.products
instead of just products
.