softbless
asked on
Remove "new line"character
Hi Guys,
I need a MySQL Syntax to remove "new line" character in a field.
I've tried these 2 code, but it not working
UPDATE table1 SET assigned_user_id=REPLACE(a ssigned_us er_id, '\r\n', '');
UPDATE table1 SET assigned_user_id=REPLACE(a ssigned_us er_id, '\n', '');
Please help. Thanks.
I need a MySQL Syntax to remove "new line" character in a field.
I've tried these 2 code, but it not working
UPDATE table1 SET assigned_user_id=REPLACE(a
UPDATE table1 SET assigned_user_id=REPLACE(a
Please help. Thanks.
ASKER
@DalHorinek it's still working
And i've also tried below, and it's also not working:
update table1 SET assigned_user_id = TRIM(TRAILING '\r\n' FROM assigned_user_id)
And i've also tried below, and it's also not working:
update table1 SET assigned_user_id = TRIM(TRAILING '\r\n' FROM assigned_user_id)
ASKER
I mean it's still NOT working
Wat about something like UPDATE table1 SET assigned_user_id=TRIM(REPL ACE(REPLAC E(assigned _user_id, "\n", ""), "\t", ""));
Also try it with simple select
SELECT REPLACE(assigned_user_id, "\n", "") FROM table1
if it does anything
Also try it with simple select
SELECT REPLACE(assigned_user_id, "\n", "") FROM table1
if it does anything
Try this...
UPDATE table_name SET column_name = REPLACE(column_name, CHAR(13), '');
UPDATE table_name SET column_name = REPLACE(column_name, CHAR(13), '');
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
update table1 SET assigned_user_id = TRIM(TRAILING '\n' FROM assigned_user_id)