Search code examples
sybasesap-ase

remove spaces in the columns in ASE


I have columns that contain empty spaces with the data:
example:| fish | how can I update the column so my result will be : |Fish| ?
in oracle I can trim the column:

update Example set column1 = trim(column1)

I google it and i notice that ASE doesnt supoort trim.


Solution

  • You can use combine of rtrim and ltrim

    update Example set column1 = rtrim(ltrim(column1))
    

    or str_replace

    update Example set column1 = str_replace(column1,' ','')