| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: blanks in like comparison
What's about rtrim function:
v734>create table t (id number, col varchar2(10));
v734>insert into t values (0, 'me');
v734>insert into t values (1, 'me ');
v734>insert into t values (2, 'me ');
v734>insert into t values (3, 'me ');
v734>insert into t values (10, 'you');
v734>insert into t values (11, 'you ');
v734>insert into t values (12, 'you ');
v734>insert into t values (13, 'you ');
v734>select id, '"'||col||'"' col from t where rtrim(col)='me';
ID COL
---------- ------------
0 "me"
1 "me "
2 "me "
3 "me "
4 rows selected.
frank a écrit dans le message <37EA4B16.7B27CA7D_at_mediaaktiv.de>...
>Hi everyone.
>I've got a problem with some blanks in a like comparison.
>I'd like to know, if there's a possibility to cut trailing blanks, so
>they don't matter in the statement as in the Databasefield.
>
>e.g.
>Select * from dummy where d1 like 'me %'
>finds a field 'me'
>
>Is this possible?
>
>Thanks Frank
>
Received on Fri Sep 24 1999 - 04:20:59 CDT
![]() |
![]() |