I have a big query table with a column that has embedded new line character. I want to remove it using a function. It has to be a done using function and I cannot use properties like allowQuotedNewlines etc. I tried below and it is not working. Appreciate your help here.
select replace(column,'\\n','') from table
Without seeing your SQL or the error, it's hard to know what you're doing wrong. But REPLACE works just fine for me:
SELECT
new_line_delims,
REPLACE(new_line_delims, '\\n', '') AS new_line_delims_replaced
FROM (
SELECT
'\\nThis has several embedded\\n new line delims\\n' AS new_line_delims)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With