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: When did VARCHAR2 columns store trailing spaces?

Re: When did VARCHAR2 columns store trailing spaces?

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 9 Jun 2006 09:54:33 -0400
Message-ID: <_-idnaP7HuwG4BTZnZ2dnUVZ_qOdnZ2d@comcast.com>

"Jeff Kish" <jeff.kish_at_mro.com> wrote in message news:bqsi829j89gp44ohg6jj4ad16u5ua93es7_at_4ax.com...

: <snip>

: >>>Yes, the formatting isn't the best, but note the trailing spaces I
: >>>submitted to Oracle remain in the stored value. I remember when this
: >>>didn't occur; I'm wondering when this 'broke' and if there is a fix.
: >>
: >>
: >> Oracle doesn't pad automatically.
: >> However, I don't think Oracle ever trimmed redundant spaces *supplied*
: >> in an INSERT statement.
: >
: >I think you're right.
: >Same behaviour with 9.2.0.7.0:
: >
: >SQL> create table numtest(my_num number, my_val varchar2(9));
: >
: >Table created.
: >
: >SQL> insert into numtest values(0011, '0011 ');
: >
: >1 row created.
: >
: >SQL> select my_num, ''''||my_val||'''' from numtest;
: >
: > MY_NUM ''''||MY_VA
: >---------- -----------
: > 11 '0011 '
: >

: I concur.. I don't ever remember oracle padding or stripping trailing spacesin
: a varchar2. Sounds like a bad thing to 'automatically' do especially for a
: varchar field.
: Jeff Kish

i concur -- going back to version 4

++ mcs Received on Fri Jun 09 2006 - 08:54:33 CDT

Original text of this message

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