Hello,
I have this data 'v_lan' and also 'vclan'. I would
like to select 'v_lan' but not 'vclan'. Is it possible
to do that?
I tried
set escape on
select col1 from table where col1 like 'v\_lan'
/
but it doesn't work.
thank you,
benny
__
Do you Yahoo!?
select col1 from table where col1 like 'v\_lan' escape '\' ;
-Original Message-
From: Benny Pei [mailto:[EMAIL PROTECTED]
I have this data 'v_lan' and also 'vclan'. I would
like to select 'v_lan' but not 'vclan'. Is it possible
to do that?
I tried
set escape on
select col1
Title: RE: select strings with '_' in it
Remember, '_' matches any 1 character, so change what you're looking for.
Try:
Select col1 from table
where translate(col1,'_','#') like 'v#lan%'
/
Regards,
Alan Martin
Defense Logistics Info Service
Battle Creek, MI
-Original Message-
From
Title: RE: select strings with '_' in it
Hi!
I think translate is overkill here.
Use:
select col from tab where col like 'v\_lan' escape
'\';
Tanel.
- Original Message -
From:
Martin,
Alan (Contractor) (DLIS)
To: Multiple recipients of list ORACLE-L
Sent
Tanel Poder wrote:
Hi!
I think translate is overkill here.
Use:
select col from tab where col like 'v\_lan' escape '\';
vs
Select col1 from table
where translate(col1,'_','#') like 'v#lan%'
/
Not only is the escape method cleaner, it's much more efficient. Unless
you have