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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
viferenc
Helper II
Helper II

ODBC - You have an error in your SQL syntax

Dear All,

 

I would like to ask for your advice.


I would like to connect data to Power BI Desktop through ODBC.

As you can see the ODBC Connection is working. 

I have also copied the field types.

 

The problem is when I try to connect the data to Power BI desktop I receive an error message (see below), which I do not understand.

 

Could you please help me to solve the problem.

 

Thank you very much for you help.

 

Best regards

 

Feri

 

 

viferenc_3-1650810815324.png

 

viferenc_2-1650810677964.png

 

viferenc_0-1650810479386.png

 

viferenc_1-1650810595475.png

 

 

1 ACCEPTED SOLUTION
7 REPLIES 7
SpartaBI
Community Champion
Community Champion

@viferenc 
Remove the first row from the code.
Refer to the database in the connection string box above.  
Alternatively, you can put it in the ODBC configuration dialog box to set some stuff there as default, like server, database etc. 
What ever you will put in the conneciton string in the Power BI will override the default in case they collide. 
Hope that helps.

Thank you, it works.

 

but now I have received another error message

viferenc_0-1650813849977.png

 

viferenc_1-1650814054359.png

 

viferenc_2-1650814071507.png

 

Thank you for your support

 

BR

 

Feri

 

From the error message I can suspect that maybe one of your columns in the source has a data type not supported by Power BI. Try check that by elimination, only bring one at a time and see which one cause that error.

I have found the columns.

I have the problem with columns where the type varchar is.

 

Is there a possibilty to change the type during the loading. If yes, how.

In the database I´m not able to change anything, I have only reading rights. 

 

viferenc_0-1650836487833.png

 

Thank you for your help.

 

 

 

Try in the SQL statement you write to change the type

I´m sorry, is there a possibility to help me by writting the SQL statment. Unfortunately I´m not so developed in SQL statement, I can do the simply ones but this does not work for me.

 

Thank you in advance

 

BR

 

Feri

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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