Forum Discussion

jpersQ's avatar
jpersQ
Frequent Visitor
1 year ago
Solved

SQL REPLACE function broken on Fabric Lakehouse SQL Endpoint

REPLACE is not replacing values in some instances:    
  • Ray_Minds's avatar
    1 year ago

    Hi jpersQ
     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:

    SELECT [Id],
           [Description],
           REPLACE(
               REPLACE(
                   REPLACE(Description, CHAR(13) + CHAR(10), ''),
                   CHAR(13), ''),                                
               CHAR(10), '') AS Cleaned_Description              
    FROM bronze_Salesforce_event;



     

    Best regards,
    Ray Minds
    http://www.rayminds.com
    https://www.linkedin.com/company/rayminds/

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