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: Varchar search is very literal

Re: Varchar search is very literal

From: Steve Adams <steve.adams_at_ixora.com.au>
Date: Fri, 01 Sep 2000 03:28:25 GMT
Message-ID: <39af21a2.341397403@nsw.nnrp.telstra.net>

Hi All,

It is not directly related, but you may find this interesting ...

    SQL> select count(*) from dual where 'x' = 'x ';

      COUNT(*)


             1

@   Regards,
@   Steve Adams
@   http://www.ixora.com.au/
@   http://www.christianity.net.au/
@   
@   Going to OpenWorld?
@   Catch the Ixora performance tuning seminar too!
@   See http://www.ixora.com.au/seminars/ for details.


On Wed, 30 Aug 2000 20:23:54 GMT, jgotthelf_at_my-deja.com wrote:

>Hi,
>
>I have found that with a varchar2 field that searches seem to care
>about trailing spaces, i.e.:
>
>create table fred (fld1 varchar(10))
>insert into fred values ('cat ') -- 4 spaces after 'cat'
>commit
>
>select * from fred where fld1 = 'cat'
>
>returns zero rows. With regular 'Char' this works just fine.
>
>Is there a way to alter this behavior, or is this just the way it is?
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Aug 31 2000 - 22:28:25 CDT

Original text of this message

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