Forum Discussion
SQL Query on Import Not Working
- 6 years ago
Thanks az38. I checked the length as part of my troubleshooting and had moved on to checking the actual ASCII value of the last character as I knew the length was different. Giving you a kudos though because someone else may have the same question.
I ended up checking the ASCII characters in the SQL query instead of PQ and it turns out the ones that didn't get trimmed automatically actually had a non-breaking space (character 160) instead of a space --- but then when imported into PBI, this was translated back to character 32 - cool, right? I fixed it with this SQL code:
SELECT RTRIM(ITEM.ITEM_ID, CHR(32)||CHR(160)) Item ...Thanks for your help!
Hi BekahLoSurdo
it looks like you have other special characters in trimmed cells
to debug, check LEN([Item]) and LEN([TRIM(Item))
Thanks az38. I checked the length as part of my troubleshooting and had moved on to checking the actual ASCII value of the last character as I knew the length was different. Giving you a kudos though because someone else may have the same question.
I ended up checking the ASCII characters in the SQL query instead of PQ and it turns out the ones that didn't get trimmed automatically actually had a non-breaking space (character 160) instead of a space --- but then when imported into PBI, this was translated back to character 32 - cool, right? I fixed it with this SQL code:
SELECT
RTRIM(ITEM.ITEM_ID, CHR(32)||CHR(160)) Item
...Thanks for your help!