Searching for string with multiple spaces [message #371222] |
Tue, 19 September 2000 17:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gino
Messages: 2 Registered: September 2000
|
Junior Member |
|
|
How could I write a select statement to search for all records with "1500(one space)Westlake(one space)North" if the table column
has "1500(multiple spaces)Westlake(multiple spaces)North ?
I've been trying to use LIKE and % but it doesn't work
|
|
|
Re: Searching for string with multiple spaces [message #371225 is a reply to message #371222] |
Wed, 20 September 2000 05:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Andreas Pollmeier
Messages: 7 Registered: February 2000
|
Junior Member |
|
|
Hello Gino!
Why don't you use the replace-function to
delete (!) all spaces in the two strings
before comparing them.
Example:
select 'Got one!' from dual where replace
('1500 Westlake North',' ','')=replace('1500 ...many spaces... Westlake North',' ','');
Andreas
P.S.
|
|
|
|