<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420500#M7395</link>
    <description>&lt;P&gt;The query is as above:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT ASCII(SUBSTRING(REPLACE(REPLACE(CAST([Description] AS NVARCHAR(4000)), NCHAR(13), ''), NCHAR(10), ''), 14, 1)) AS D
FROM [dbo].[bronze_Salesforce__event]
where Id= '00UVS000003zCXI2A2'&lt;/LI-CODE&gt;&lt;P&gt;I'm having a hard time getting an anyonymized data example since the issue is finicky.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 20:36:06 GMT</pubDate>
    <dc:creator>jpersQ</dc:creator>
    <dc:date>2025-02-20T20:36:06Z</dc:date>
    <item>
      <title>SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420321#M7392</link>
      <description>&lt;P&gt;REPLACE is not replacing values in some instances:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="REPLACE.png" style="width: 740px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1241897i0AA1452741FE3829/image-size/large?v=v2&amp;amp;px=999" role="button" title="REPLACE.png" alt="REPLACE.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 18:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420321#M7392</guid>
      <dc:creator>jpersQ</dc:creator>
      <dc:date>2025-02-20T18:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420481#M7394</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share query and example&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:13:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420481#M7394</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-20T20:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420500#M7395</link>
      <description>&lt;P&gt;The query is as above:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT ASCII(SUBSTRING(REPLACE(REPLACE(CAST([Description] AS NVARCHAR(4000)), NCHAR(13), ''), NCHAR(10), ''), 14, 1)) AS D
FROM [dbo].[bronze_Salesforce__event]
where Id= '00UVS000003zCXI2A2'&lt;/LI-CODE&gt;&lt;P&gt;I'm having a hard time getting an anyonymized data example since the issue is finicky.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:36:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420500#M7395</guid>
      <dc:creator>jpersQ</dc:creator>
      <dc:date>2025-02-20T20:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420509#M7396</link>
      <description>&lt;P&gt;SELECT ASCII(SUBSTRING(REPLACE(REPLACE(CAST([Description] AS VARCHAR(8000)), CHAR(13), ''), CHAR(10), ''), 14, 1)) AS D&lt;BR /&gt;FROM [dbo].[bronze_Salesforce__event]&lt;BR /&gt;WHERE Id = '00UVS000003zCXI2A2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try this once&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:45:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420509#M7396</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-20T20:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420513#M7397</link>
      <description>&lt;P&gt;Already tried, it doesn't fix the issue.&amp;nbsp; Neither does casting as NVARCHAR, or casting as NVARCHAR plus using NCHAR(13) and NCHAR(10).&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:46:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420513#M7397</guid>
      <dc:creator>jpersQ</dc:creator>
      <dc:date>2025-02-20T20:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420519#M7398</link>
      <description>&lt;P&gt;Ok. Try recreate the table using explicit `VARCHAR` column definitions in Spark (e.g., `VARCHAR(40)` instead of generic `STRING`)&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:50:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4420519#M7398</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-20T20:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4423101#M7452</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you are facing issue with REPLACE function, which is not working properly in few instances. As&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;&amp;nbsp;responded to your query, were you abke to go through his responses. If you are able to solve the issue, please mark the helpful reply as solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also take a moment to thank &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Hammad.&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please mark it as a solution, so that other members find it more quickly.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 15:09:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4423101#M7452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-22T15:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4586104#M7525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.&lt;/P&gt;
&lt;P&gt;If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.&lt;BR /&gt;Thank you for your patience and look forward to hearing from you.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 13:56:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4586104#M7525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-26T13:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4591911#M7628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2025 18:45:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4591911#M7628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-02T18:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4594704#M7691</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;&lt;BR /&gt;&amp;nbsp;To remove all carriage return (CHAR(13)) and line feed (CHAR(10)) characters from your SQL Server data, you can utilize the REPLACE function as follows:&lt;/P&gt;&lt;P&gt;SELECT [Id],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Description],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE(Description, CHAR(13) + CHAR(10), ''),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHAR(13), ''),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHAR(10), '') AS Cleaned_Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;FROM bronze_Salesforce_event;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ray_Minds_0-1741082177481.jpg" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1246343i669D76BC1B451C7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ray_Minds_0-1741082177481.jpg" alt="Ray_Minds_0-1741082177481.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Ray Minds&lt;BR /&gt;&lt;A href="http://www.rayminds.com" target="_blank"&gt;http://www.rayminds.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/company/rayminds/" target="_blank"&gt;https://www.linkedin.com/company/rayminds/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 09:58:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4594704#M7691</guid>
      <dc:creator>Ray_Minds</dc:creator>
      <dc:date>2025-03-04T09:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4600268#M7769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/594696"&gt;@jpersQ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 10:55:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4600268#M7769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-07T10:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4632045#M8331</link>
      <description>&lt;P&gt;&lt;BR /&gt;REPLACE for CRLF or CHAR(10), CHAR(13) is definetly broken. I tested using SSMS and Browser SQL analytics endpoint.&lt;BR /&gt;I needed to create the view in order to use the transformed data but failed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought of using the a custom scaler function where I was successfully replacing them by looping through characters.&lt;/P&gt;&lt;P&gt;Of course, scaler functions are not allowed end up using CTE. Too much work around in order to fix small thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 19:11:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/SQL-REPLACE-function-broken-on-Fabric-Lakehouse-SQL-Endpoint/m-p/4632045#M8331</guid>
      <dc:creator>malghani</dc:creator>
      <dc:date>2025-03-31T19:11:25Z</dc:date>
    </item>
  </channel>
</rss>

