How can I replace (\n) in SQL with a Line Breaks? i want to do it with a SQL query,
I want in table: catalog_product_entity_text replace the value with Line Breaks instead of (\n)
Hello @iuvcureadhdc0c
Use below query for can I replace (\n) in SQL with a Line Breaks:
UPDATE catalog_product_entity_text SET value = REPLACE(value, '\\n', CHAR(10)) WHERE value LIKE '%\\n%';
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
Try this query:-
replace \n with <br> like :- UPDATE catalog_product_entity_text SET value = REPLACE (value, '\n', '<br>');
use REPLACE() function REPLACE(column_name, 'search_string', 'replace_string')