Results 1 to 5 of 5

Thread: Plzz,can anyone help me building a searching SQL statement??

  1. #1
    Join Date
    Jul 2006
    Posts
    29

    Plzz,can anyone help me building a searching SQL statement??

    Is there any technique to return the result that are spelled differently but sound alike,
    Like cumputor, camputer,camputr,computer,komputer,chomputer etc..

    I have heard it is possible in ORACLE to use a function called soundex() to compare strings of such kind..

    is there any function like this in sql server 2000?

    wat i need to accomplish is , a string parameter is passed, for example 'computer'... then i need to find out values from a field that are sound alike even though can have different spellings..

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Yes, SQL Server also has SOUNDEX function.

    Did you check Books Online?.

    SOUNDEX
    Returns a four-character (SOUNDEX) code to evaluate the similarity of two strings.

    Syntax
    SOUNDEX ( character_expression )

  3. #3
    Join Date
    Jul 2006
    Posts
    29

    Thanks a lot

    Mr Skhanal first of all thanks for ur nice effort in replying my post. I will check out soundex() function too as u said it is available.

    BUT

    wat i need to accomplish is , a string parameter is passed, for example 'computer'... then i need to find out values from the database that sound alike even though can have different spellings.. like komputer, chomputer,cumputer,conputer etc...


    thank you

  4. #4
    Join Date
    Dec 2004
    Posts
    502
    Just use SOUNDEX like skhanal stated:

    SELECT * FROM YourTable
    WHERE SOUNDEX(YourColumn) = SOUNDEX(@InputValue)

    I've tried using SOUNDEX before, and IMO I didn't find it to be very accurate.

  5. #5
    Join Date
    Jul 2006
    Posts
    29

    Thanks all for reply

    Thanks to all who replied the post at least now i got idea to move to which direction ... i think i can now find out the better solution out from this fuction to solve it....

    thanks once again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •