You may receive the following errors if you incorrectly alias your column names:
Invalid column name
No column was specified
Check to make sure that your column names are encased in brackets and are not encased by quotes.
SELECT [bar] FROM (SELECT 'foo' AS 'bar' FROM t1) a
SELECT [bar] FROM (SELECT 'foo' AS [bar] FROM t1) a