0

Hi People.... I have a table named 'csv_data_table' and it has a varchar(255) column named 'EMAIL'

This EMAIL column has multiple records with white spaces (at front and end)

I tried this way to eliminate the white space

UPDATE csv_data_table SET EMAIL = trim(EMAIL);

But it won't work.... the email values still have trailing blank spaces.

anyone know of a solution?

2
Contributors
6
Replies
14
Views
3 Years
Discussion Span
Last Post by Albert Pinto
0

Sir, I saw it in phpmyadmin....... the records had spaces... one of the record I edited and removed the space via phpmyadmin itself...

so it was like 'abc@yahoo.com ' (note: quotes not present)

After editing in phpmyadmin I made it 'abc@yahoo.com'

Then I again created space at the end of the string in phpmyadmin.... So it was like 'abc@yahoo.com '

and then ran the query.... It did eliminate the space... making it 'abc@yahoo.com'

Now I'm kinda confused... was it blank space only.. well it did appeared like blank space... I even exported the ORIGINAL db file in sql format and opened it in notepadd++ searched for the email value and it was indeed 'abc@yahoo.com '

0

It did eliminate the space

Perhaps it was another non-visible character, that phpMyAdmin wasn't showing correctly.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.