Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: extra character at the end of data?

Re: extra character at the end of data?

From: John <jriker1_at_yahoo.com>
Date: 7 Jan 2002 05:48:56 -0800
Message-ID: <e6bb5a8d.0201070548.6a75981b@posting.google.com>


Scott,

Thanks a lot. That really helped. I noticed a bunch of 20's at the end of each one. Now I need to decide whether to modify the table, or just adjust the query.

JR

"Scott Mattes" <ScottMattes_at_yahoo.com> wrote in message news:<v24Z7.1289$gO5.886379_at_news1.news.adelphia.net>...
> If it doesn't return anything when you query with a trailing space either
> there is more than one space or some non-displayable character.
>
> You might try doing a 'select rawtohex( field_name ) from yourtable' to see
> just exactly is there.
>
> If it is trailing spaces, you could probably remove them by updating the
> table and setting the field equal to rtrim( ) of that field.
>
>
> "John" <jriker1_at_yahoo.com> wrote in message
> news:e6bb5a8d.0201031149.42e10df3_at_posting.google.com...
> > I just inherited a database and to my dismay, my sql statements were
> > failing to return results most of the time. I have a list of
> > countries, and when I return a distinct on that list, placing " "
> > characters before and after the data, there seems to be an extra space
> > at the end of most of the countries. (Data visually returned: "UNITED
> > STATES ". The field is a NOT NULL VARCHAR2(50) field. If I do a:
> >
> > country = 'UNITED STATES'
> >
> > it returns no results. If I do a:
> >
> > country like 'UNITED STATES%'
> >
> > it returns the US entry.
> >
> > If I just do a:
> >
> > country = 'UNITED STATES '
> >
> > with a space at the end, it fails to return anything.
> >
> > Any ideas what is going on here? A couple of the countries return
> > with no extra blank looking spaces, and those work fine. Thanks.
> >
> > JR
Received on Mon Jan 07 2002 - 07:48:56 CST

Original text of this message

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