SQL query with space in column name

Hi everyone,

I was just wanting to know if there was a syntax that could be used to query a column name that has spaces in its title. E.g. SELECT First Name FROM xxxxx

I’m trying to run an SQL statement where there is a column called ‘First Name’ that has the space in its title

Many thanks,

Hi @Jeff91

Have you got a screenshot/PBIX file by any chance so can understand what you mean? I can’t say I’ve ever had any issues with spaces in column names before so bit confused what’s going on.

Hi,

IF you are using MSSQL then you can call the column name like [First Name] or ‘First Name’.

Thanks,
Anurag

@Jeff91

SELECT [First Name]
FROM xxxxxxx

1 Like

Hello @Jeff91, good to see that you are having progress with your inquiry.

Did the responses from @AntrikshSharma help you solve your inquiry?

If not, we agree with @jamie.bryan that you send your PBIX file so we can help you further with your inquiry.

If yes, kindly mark as solution the answer that solved your query. Thanks!

Hi @Jeff91, we’ve noticed that no response has been received from you since August 17. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @Jeff91, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.