Hello!
I am receiving an 'Arithmetic overflow error converting expression to data type varchar.' error while importing a view from SQL server. Able to import, but when I go to effect the data in power query at all it throws this error. I am only attempting to sort the data not casting any of the values.
Full error:
Message=Arithmetic overflow error converting expression to data type varchar.
ErrorCode=-2146232060
Number=8115
Class=16
All of the columns seem to match up - all of my varchar columns in SQL are being converted to text values in Power BI.
Any help is greatly appreciated! Let me know if you need more information!
SELECT MAX(LEN(column_name)) FROM table_name;
If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more. I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends. Visit my Blog: www.powerplatformplace.com
|
Hi Ahmed, @AhmedSalih
Thank you for the input. Do you know of a good way to check the SQL database for values that are too long for the varchar length? I have about 30 or so varchar columns and I'm not sure which one needs the length increased. No errors inside SQL server or Power query indicating which column is the issue.
Thank you!
Hello, @WorksightedTS To avoid this problem, make sure that the length of the VARCHAR variable or column is long enough to hold the decimal or numeric value, counting the decimal point as part of the converted VARCHAR value.
If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more. I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends. Visit my Blog: www.powerplatformplace.com
|
stampcoin
17
mmbr1606
13
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1