René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

soundex [Oracle SQL]

soundex(string)
create_table.sql
create table names_ (
  id    number,
  name  varchar2(40)
);
ins_table.sql
insert into names_ values (1,   'Hofmann' );
insert into names_ values (2,   'Hoffmann');

insert into names_ values (3,   'Meyer'   );
insert into names_ values (4,   'Maier'   );
insert into names_ values (5,   'Meier'   );

insert into names_ values (6,   'Saffran' );
insert into names_ values (7,   'Saphran' );

insert into names_ values (8,   'A. Basler');

commit;
select * from names_ where soundex(name) = soundex('hofmann');
 1 Hofmann
 2 Hoffmann
select * from names_ where soundex(name) = soundex('meier');
 3 Meyer
 4 Maier
 5 Meier
select * from names_ where soundex(name) = soundex('safran');
 6 Saffran
 7 Saphran
select * from names_ where soundex(name) = soundex('a basler');
 8 A. Basler

Links