How to write soundex query in postgresql??

Started by Vinay Jainover 21 years ago4 messagesgeneral
Jump to latest
#1Vinay Jain
vinayjain@gmail.com

Hi
I want to write soundex query for example:
select * from student where name soundex 'vinay';
In psql it gives error at soundex.
Regards
Vinay
--
Vinay Jain
Dissertation Project Trainee
DAKE Division
C-DAC Mumbai

#2Mike Mascari
mascarm@mascari.com
In reply to: Vinay Jain (#1)
Re: How to write soundex query in postgresql??

Vinay Jain wrote:

Hi
I want to write soundex query for example:
select * from student where name soundex 'vinay';
In psql it gives error at soundex.

The /contrib module fuzzystrmatch has a soundex() function. I
haven't used it though...

Mike Mascari

#3Richard Huxton
dev@archonet.com
In reply to: Vinay Jain (#1)
Re: How to write soundex query in postgresql??

Vinay Jain wrote:

Hi
I want to write soundex query for example:
select * from student where name soundex 'vinay';
In psql it gives error at soundex.

Where did you find documentation on a "soundex" operator?

--
Richard Huxton
Archonet Ltd

#4Elie Nacache
elie_nacache@yahoo.com
In reply to: Vinay Jain (#1)
Re: How to write soundex query in postgresql??

Hi Vinary,

One way to implement tolerant search algorithms is to use the soundex algorithm for PostgreSQL, which can be found in the contributed directory of the PostgreSQL source tree.

try SELECT * FROM student WHERE soundex(name)=soundex('vinay');

see http://www.samspublishing.com/articles/article.asp?p=24691

Good luck
Elie Nacache

Vinay Jain <vinayjain@gmail.com> wrote:
Hi
I want to write soundex query for example:
select * from student where name soundex 'vinay';
In psql it gives error at soundex.
Regards
Vinay
--
Vinay Jain
Dissertation Project Trainee
DAKE Division
C-DAC Mumbai

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

---------------------------------
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.