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: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 13 Aug 2006 20:00:23 -0700
Message-ID: <1155524423.882462@bubbleator.drizzle.com>


Dereck L. Dietz wrote:
> In a previous series of posts it was mentioned that using TRIM during
> database inserts basically doesn't trim anything.

Could you run that one by me again?



SQL*Plus: Release 10.2.0.2.0 - Production on Sun Aug 13 19:58:11 2006

Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options

SQL> create table t (

   2 testcol varchar2(20));

Table created.

SQL> insert into t

   2 (testcol)
   3 values
   4 (' TEST '); 1 row created.

SQL> select length(testcol) from t;

LENGTH(TESTCOL)


              10

SQL> insert into t

   2 (testcol)
   3 values
   4 (TRIM(' TEST ')); 1 row created.

SQL> select length(testcol) from t;

LENGTH(TESTCOL)


              10
               4

SQL>



It would seem I am misunderstanding what you are describing.
-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Aug 13 2006 - 22:00:23 CDT

Original text of this message

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