Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Update Oracle table to remove whitespace using trim function

Re: Update Oracle table to remove whitespace using trim function

From: G Quesnel <dbaguy_ott_at_yahoo.com>
Date: 1 Aug 2006 14:12:07 -0700
Message-ID: <1154466727.725593.116660@p79g2000cwp.googlegroups.com>


Can you show us what you have tried,
and why do you think you need a sub select ? To simply remove spaces from the front and/or end of a column is trivial ...
ex: update mytable set colx = trim(colx);

You could even only update rows that require triming, with something like...
update mytable

   set colx = trim(colx)
 where length(colx) > length(trim(colx));

HTH Received on Tue Aug 01 2006 - 16:12:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US