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 -> extra character at the end of data?

extra character at the end of data?

From: John <jriker1_at_yahoo.com>
Date: 3 Jan 2002 11:49:01 -0800
Message-ID: <e6bb5a8d.0201031149.42e10df3@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 Thu Jan 03 2002 - 13:49:01 CST

Original text of this message

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