Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Select column with "." in the name

Hi all,

 

I have a problem as I want to collect only a few columns from a table. But the column name in the database have a "." in it, which gives an error: extraneous input '.0' for example. In the column alrmbitsfeeddrive.0.

 

Here my query, how can I make it so power bi sees it as a column name. 

 

= Odbc.Query("dsn=" & ConnectionName & "", "
SELECT timestamp,

runningshours,

alrmbitsfeeddrive.0, 
alrmbitsfeeddrive.1,
alrmbitsfeeddrive.3,
FROM " & TableName & "
WHERE serial_number = XXXX
ORDER BY timestamp ASC
")

 

Hope you can help me

6 REPLIES 6
JosefPrakljacic
Solution Sage
Solution Sage

Depending on the Database you are selecting from if its a SQL Server you need write your columnnames within brackets and if it's a oracle database you need to select the columns within ". 

 

Was the answer helpful? Please share some Kudos Smiley Happy

Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Have you tried using brackets with the columns like this [alrmbitsfeeddrive.0]

Anonymous
Not applicable

Yes tried that aswell.. Gives same error

Which underlying DB Vendor do you have? Postgres, Oracle, Microsoft, MySQL...

Anonymous
Not applicable

Hi,

Thanks for helping!

Sorry, But where can you find that? 

Could it be azure sql databasE?

 

This is the Power bi version: Versie: 2.68.5432.841 64-bit (april 2019)

I think we have a misunderstanding here. You are querying a database via ODBC. So you have to know what kind of vendoris behind this database. I can't answer that for you.

 

But from the beginning your query has to look like this to work on a SQL Server:

= Odbc.Query("dsn=" & ConnectionName & "", "
SELECT timestamp,

runningshours,

[alrmbitsfeeddrive.0], 
[alrmbitsfeeddrive.1],
[alrmbitsfeeddrive.3],
FROM [" & TableName & "]
WHERE serial_number = XXXX
ORDER BY timestamp ASC
")

 

BR,

Josef

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.