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: How compare CHAR and VARCHAR2

Re: How compare CHAR and VARCHAR2

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 27 Apr 2005 21:00:06 -0700
Message-ID: <1114660568.221285@yasure>


Malcolm Dew-Jones wrote:

> Depends exactly what you are trying to compare. You can do things like
>
> SELECT * FROM tab
> WHERE
> ltrim(rtrim(column_char)) like '%'||column_varchar2||'%';

I hope not. ;-)

Unless you have a very old version of Oracle.

Replace
ltrim(rtrim(column_char))
with
TRIM(column_char)

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Apr 27 2005 - 23:00:06 CDT

Original text of this message

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