SOUNDEX in SQL-Select with like?

SOUNDEX in SQL-Select with like?

Post by Michael Buresc » Sun, 31 Dec 1899 09:00:00



Hallo,

1.)
when I say:
SELECT EMPL_NO,NAME FROM EMPL WHERE NAME = 'MEIER'
 i get all records with name = MEIER -> O.K.
2.)
when I say:
SELECT EMPL_NO,NAME FROM EMPL WHERE SOUNDEX (NAME) = SOUNDEX ('MEIER')
 i get all records with name = MEIER, MAYR, MEUER, etc. -> O.K.
3.)
when I say:
SELECT EMPL_NO,NAME FROM EMPL WHERE NAME LIKE '%MEIER%'
 i get all records with name = MEIER, SCHULK & MEIER, etc. -> O.K.
4.)
But how do I crete a SQL Select with SOUNDEX and like????????????????

Best reagrds,
Michael

 
 
 

SOUNDEX in SQL-Select with like?

Post by Martin Haltmaye » Sun, 31 Dec 1899 09:00:00


You have to prepare a function word_soundex that returns the
concatenated soundex values of the words that its argument consists of.

Then you can do

select empl_no, name from empl where word_soundex (name) = soundex
('meier')

Martin


> Hallo,

> 1.)
> when I say:
> SELECT EMPL_NO,NAME FROM EMPL WHERE NAME = 'MEIER'
>  i get all records with name = MEIER -> O.K.
> 2.)
> when I say:
> SELECT EMPL_NO,NAME FROM EMPL WHERE SOUNDEX (NAME) = SOUNDEX ('MEIER')
>  i get all records with name = MEIER, MAYR, MEUER, etc. -> O.K.
> 3.)
> when I say:
> SELECT EMPL_NO,NAME FROM EMPL WHERE NAME LIKE '%MEIER%'
>  i get all records with name = MEIER, SCHULK & MEIER, etc. -> O.K.
> 4.)
> But how do I crete a SQL Select with SOUNDEX and like????????????????

> Best reagrds,
> Michael


 
 
 

SOUNDEX in SQL-Select with like?

Post by Michael Buresc » Sun, 31 Dec 1899 09:00:00


Who have cerated a function, and can post it?

Best regards,
Michael


> You have to prepare a function word_soundex that returns the
> concatenated soundex values of the words that its argument consists of.

> Then you can do

> select empl_no, name from empl where word_soundex (name) = soundex
> ('meier')

> Martin


> > Hallo,

> > 1.)
> > when I say:
> > SELECT EMPL_NO,NAME FROM EMPL WHERE NAME = 'MEIER'
> >  i get all records with name = MEIER -> O.K.
> > 2.)
> > when I say:
> > SELECT EMPL_NO,NAME FROM EMPL WHERE SOUNDEX (NAME) = SOUNDEX ('MEIER')
> >  i get all records with name = MEIER, MAYR, MEUER, etc. -> O.K.
> > 3.)
> > when I say:
> > SELECT EMPL_NO,NAME FROM EMPL WHERE NAME LIKE '%MEIER%'
> >  i get all records with name = MEIER, SCHULK & MEIER, etc. -> O.K.
> > 4.)
> > But how do I crete a SQL Select with SOUNDEX and like????????????????

> > Best reagrds,
> > Michael

 
 
 

SOUNDEX in SQL-Select with like?

Post by JO » Sun, 31 Dec 1899 09:00:00


SELECT EMPL_NO,NAME FROM EMPL WHERE NAME LIKE '%MEIER%' AND SOUNDEX
(NAME) = SOUNDEX ('MEIER')  ?

Jo



Quote:>Hallo,

>1.)
>when I say:
>SELECT EMPL_NO,NAME FROM EMPL WHERE NAME = 'MEIER'
> i get all records with name = MEIER -> O.K.
>2.)
>when I say:
>SELECT EMPL_NO,NAME FROM EMPL WHERE SOUNDEX (NAME) = SOUNDEX ('MEIER')
> i get all records with name = MEIER, MAYR, MEUER, etc. -> O.K.
>3.)
>when I say:
>SELECT EMPL_NO,NAME FROM EMPL WHERE NAME LIKE '%MEIER%'
> i get all records with name = MEIER, SCHULK & MEIER, etc. -> O.K.
>4.)
>But how do I crete a SQL Select with SOUNDEX and like????????????????

>Best reagrds,
>Michael

*************************************************

The usual - anything I say reflects on me, and not upon my current employer.

*************************************************

 
 
 

1. pgsql/contrib/soundex (soundex.c soundex.sql.in)


Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/contrib/soundex
     from hub.org:/home/projects/pgsql/tmp/cvs-serv51753/contrib/soundex

Modified Files:
        soundex.c soundex.sql.in

-----------------------------  Log Message  -----------------------------

Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list.  Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention.  pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'.  A newstyle function must be identified
by an associated info routine.  See src/backend/utils/fmgr/README.

2. 18791-TX-MESQUITE-ORACLE-DBA Skills-DB2-SYBASE-Windows NT-UNIX-ORACLE DBA

3. select soundex(string1), soundex(string2)

4. Crystal Report: How to Set Location of OLE object at Run Time

5. Counting the number of satisfied LIKES in a SELECT statement

6. PDOX 4.0 Cheshire Labels Problem

7. pgsql/contrib/soundex (soundex.c)

8. SQL server hanging

9. MS SQL Soundex function

10. SOUNDEX - plans for SQL function?

11. Alternative Soundex for SQL 6.0

12. sql server soundex problem