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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
tahir9
Frequent Visitor

Microsoft Sql converting data type varchar(10) '___' to int only in powerbi?

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] Microsoft SQL: Conversion failed when converting the varchar value '_____' to data type int..
'.

 

Hello i am getting this error but my query runs fine in SQL Management Studio not sure what column is causing this issue either since power bi isn't specifying... anyone had ideas to alleviate issue? 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tahir9,

 

Did you try to change the data type in the Query Editor? Are they some underlines? Microsoft Sql converting data type varchar(10) '___' to int only in powerbi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tahir9,

 

Did you try to change the data type in the Query Editor? Are they some underlines? Microsoft Sql converting data type varchar(10) '___' to int only in powerbi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ah yes I did thank you!
mehaboob557
Resolver IV
Resolver IV

Hi @tahir9,

 

Go in edit queries. then clicl on source and update this in that [ReturnSingleDatabase=true, OldGuids=true, CommandTimeout=#duration(0, 1, 0, 0)])

 

may be some data will be not in a correct format. so this error may occur.

 

add with OldGuids=true in your source and your error will go.

 

Hope this may help you

 

Regards,

Mehbub

Hello thanks for the reply but i am not sure what you mean... or where i can update that i am not seeing that when i go to edit queries and sources... ? 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.