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.
Incorrect
SELECT [bar] FROM (SELECT 'foo' AS 'bar' FROM t1) a |
Correct
SELECT [bar] FROM (SELECT 'foo' AS [bar] FROM t1) a |