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: CHAR Fields treated as Variable len?????

Re: CHAR Fields treated as Variable len?????

From: Ulf Magnusson <ulf.magnusson_at_briunix.kiedt.ericsson.se>
Date: Thu, 1 Oct 1998 09:42:46 +0200
Message-ID: <6uvb69$sn0@newstoo.ericsson.se>


Hello

The CHAR datatype is right padded with blanks, so if you have a where statement
like CHAR_FIELD = 'LUIZ' you have to remove blanks from the CHAR_FIELD or add blanks to the compare string/variable.

If you have a index on the CHAR_FIELD, use the add blank (RPAD) for performance reason.

/Ulf

Lou de Freitas wrote in message <01bdebd0$c6bc5c40$422f00d0_at_LOU>...
>Help,
>
>I am working on an installation of a batch cobol program that performs a
>select into and am getting a +100 when I should get a +0. The WHERE
>criteria includes a key field defined as CHAR(20) and I am using a DCLGEN
>where the field is defined as PIC X(20). The field was loaded via the LOAD
>APPEND function having 18 char value and two spaces.
>
>The problem seems to be that the field is acting like it is variable, when
>in fact it is fixed. The only way that I could get the program to find the
>rown was to add VARYING after the PIC X(20) and set the length of the field
>and text of the field.
>
>Send email to me if you can help at Luiz.deFreitas_at_DOL.NET.
>
>Thanks,
>
>Lou d.
Received on Thu Oct 01 1998 - 02:42:46 CDT

Original text of this message

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