I am trying to get the email addresses of all subscribers of a specific Auto Suppression list. However, the issue is that the name of the column containing email addresses has a space i.e "Email Address". I tried the below query with no luck:
SELECT [Email Address] as Email FROM LIST_NAME
I get the error: Error saving the Query field.Incorrect syntax near '('.
To test my hypothesis that using square brackets to select a column containing a space was causing the issue, I added a new column to the auto suppression list called "Test" and was able to successfully query the list with the below query:
SELECT Test from LIST_NAME
However, when I attempted this query:
SELECT [Test] from LIST_NAME
I got the same error message as above (Error saving the Query field.Incorrect syntax near '('.)
But, when I put the square brackets around the list name and NOT around column name in the SELECT clause:
SELECT Test from [LIST_NAME]
the query worked fine.
So it must be something to do with using square brackets around column names in the SELECT clause? If this is true, how do you handle spaces in column names?
Any help is appreciated!