0

Errors for columns with alias

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

Norbert Krupa

Technical Consultant

Leave a Reply

Your email address will not be published. Required fields are marked *