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 -> Re: TRIM and database inserts/update

Re: TRIM and database inserts/update

From: Acme Acmeson <nahdsl232734_at_nahvip.cybercity.dk>
Date: Mon, 14 Aug 2006 01:21:19 +0200
Message-ID: <44dfb3ef$0$142$157c6196@dreader2.cybercity.dk>

"Dereck L. Dietz" <dietzdl_at_ameritech.net> wrote in message news:LxNDg.8238$9T3.7318_at_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.
>
>

This is what I would do and have done when I wanted to test something. - download the software I need from otn.oracle.com (to my home pc for testing and educational purposes after which it is deleted) - install it of course
- test - it's really that difficult !!! Received on Sun Aug 13 2006 - 18:21:19 CDT

Original text of this message

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