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

Home -> Community -> Usenet -> c.d.o.server -> TRIM and database inserts/update

TRIM and database inserts/update

From: Dereck L. Dietz <dietzdl_at_ameritech.net>
Date: Sun, 13 Aug 2006 22:17:15 GMT
Message-ID: <LxNDg.8238$9T3.7318@newssvr25.news.prodigy.net>


In a previous series of posts it was mentioned that using TRIM during database inserts basically doesn't trim anything.

If you have 'ABC' it doesn't trim anything and if you have 'ABC ' it doesn't trim the two spaces in the string because it's within the quotes.

Someone brought up a question to me about whether a statement like below:

UPDATE table

        SET field_a = trim(field_a);

Where field_a is originally 'ABC ' would result in the field being 'ABC' after the update or still 'ABC '.

Thanks for any answers. Received on Sun Aug 13 2006 - 17:17:15 CDT

Original text of this message

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