Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Depending on the version of the SQL you are running, wrapping the column names in [ ] , ' ' or `` may work
You could also connect to the database and create this query with the UI and query folding (if your source is supported)
https://devinknightsql.com/2016/07/03/power-bi-checking-query-folding-with-view-native-query/
and the SQL will be generated as the Native Query
Thanks for your help, but I have used [] and '' and "". All give the same error.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.