SQL: Remove/Strip Newline Characters From Field

April 12th, 2023






On MacOS, Sequel Ace imports CSV’s with newlines at the end.

This snippet updates the data to remvoe those lines:

UPDATE `product_skus`
SET `sku` = REPLACE(REPLACE(`sku`, CHAR(13), ''), CHAR(10), '')

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *