Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How compare CHAR and VARCHAR2
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
![]() |
![]() |