This content has been marked as final. Show 5 replies
I can't replicate your problem though. This is how the above code works:
SELECT TRIM(leading CHR(160) from <your_column_name>) FROM <your table>
SELECT trim(leading '0' from '000123') FROM Dual; TRI --- 123 1 row selected.
I tried replace(column, chr(160), '') but that did not work.are you sure it is chr(160) then? replace should work though:
SQL> with t as ( select chr(160) || ' other text' s from dual ) -- -- select length(s) length_org, length(replace(s,chr(160))) length from t / LENGTH_ORG LENGTH ---------- ---------- 12 11
Pleae can you tell us
what is the version of your database and
post some sample data and the required output.
Try and dump the contents of the column to see what that non-breaking space really is.
select dump(you_column) from your_table;
you can use translate , which will replace range of characters which are non printable from your string.
check if the char is of ascii 160 or something else using instr or ascii functions.