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: STRANAGE SELECT BEHAVIOR

Re: STRANAGE SELECT BEHAVIOR

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Sun, 15 Sep 2002 16:03:06 GMT
Message-ID: <_a2h9.110304$Jo.29524@rwcrnsc53>

They seem to matter inhis example.
"Jaap W. van Dijk" <j.w.vandijk.removethis_at_hetnet.nl> wrote in message news:ao49oucc3o9fovmm81ipvfn1mv000et0pg_at_4ax.com...
> On Sat, 14 Sep 2002 17:07:16 GMT, "Jim Kennedy"
> <kennedy-family_at_attbi.com> wrote:
>
> >Read the documentation on data types (sql reference manual). If you are
> >using char then everything is blank padded and so you have to compare
 with
> >the blanks. You should be using varchar2 which is not blank padded and
 then
> >you don't have to pad the queries with blanks.
> >Jim
> ...
>
> No, it's the other way around. Trailing spaces when comparing CHAR
> fields don't matter: Oracle will right pad the shorter field until it
> is as long as the longer field and then do the comparison. When using
> VARCHAR2 Oracle will use the trailing spaces you have specified. So (b
> is for blank) if you have stored 'X' in a VARCHAR2 field in the
> database is will not be the same as the literal 'Xb'.
>
> Jaap.
Received on Sun Sep 15 2002 - 11:03:06 CDT

Original text of this message

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