Home » SQL & PL/SQL » SQL & PL/SQL » soundex
soundex [message #208385] Sun, 10 December 2006 04:10 Go to next message
ashish_pass1
Messages: 114
Registered: August 2006
Location: delhi
Senior Member
hello all

i m using soundex function, which gives me unnecessary extra results.can u please tell me why this shows so?

if i m doing anything wrong then please suggest me.

SQL> ed
Wrote file afiedt.buf

  1  select * from emp1
  2* where soundex(NAME)=soundex('Roopak')
SQL> /

CLIENT NAME                    SAL    DEPT_NO        EMP JOB
------ ---------------- ---------- ---------- ---------- --------
C00009 Rupak                360000         20        200 clerk
C00012 Rupesh               104000         30        580 clerk




with regards
ashish
Cool
Re: soundex [message #208387 is a reply to message #208385] Sun, 10 December 2006 04:31 Go to previous messageGo to next message
dba_blr
Messages: 43
Registered: December 2006
Member
Oracle is doing the right thing in your case. How Oracle processes the SOUNDEX() function is...

1> Removes all the occurences of a, e, h, i, o, u, w, y.
In your case:
rpk
rps

2> Assigns various numbers (1-6) exluding the first letter.
In your case:
r12
r12

3> Returns 4 letters riht padded with 0.
In your case:
r120
r120

Hence it returned two rows.

SQL> select soundex('Rupak') from dual;

SOUN
----
R120

SQL> select soundex('Roopesh') from dual;

SOUN
----
R120

Hope it helps...
Re: soundex [message #208394 is a reply to message #208385] Sun, 10 December 2006 05:01 Go to previous messageGo to next message
ashish_pass1
Messages: 114
Registered: August 2006
Location: delhi
Senior Member
hello dba_blr

thank you very much for ur kind response.
but i m in puzzle, unable to understand?

dear please dnt mind.
can u give me some more hints.

thanxx

[Updated on: Sun, 10 December 2006 05:02]

Report message to a moderator

Re: soundex [message #208400 is a reply to message #208394] Sun, 10 December 2006 07:00 Go to previous messageGo to next message
dba_blr
Messages: 43
Registered: December 2006
Member
SOUNDEX() function works based on some algorithm. I only provided you the steps of the algorithm.
Please do let me know which portion of my answer was not clear to you, so that I can elaborate on that.
Re: soundex [message #208406 is a reply to message #208400] Sun, 10 December 2006 09:53 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
asish_pass1,
you have been asking quite a lot of questions here that are all answered by the docs. Also, more than once people pointed you to the docs.
Please, for your own good (you WILL learn a lot more), next time first try to find an answer yourself.
Bookmark this page and start searching from there
Previous Topic: SQL UPDATE Statement Problem
Next Topic: Access to Oracle Problem
Goto Forum:
  


Current Time: Mon Feb 17 18:21:11 CST 2025