Help with query

  • Hi ,

    I wanted to match the names like "Robert"="Robart"

    "Jennifer"="Janifar"

    I mean i wanted to match the words which sounds similar. Is there any function in SQL 2k8 to do that.

    Thanks

    Raghu

  • Yes there are functions in sql which does this. i don't remember the exact name but they are like soundex and similar try soundex

  • Is it possbile to use this function to join two tables .I mean joining on Fname by using soundex function

  • try putting an full text index on the tables and here are some commands for the comparison.

  • probably yes. something like soundex(t1.fname)=soundex(t2.fname)

  • It sounds like you could use DIFFERENCE()

    Doing something like:

    select difference('ROBERT','ROBART')

    Returns 4, which means they are very similar

    Whereas executing:

    select difference('ROBERT','ROGER')

    Returns 2, which means little similarity

    And executing:

    select difference('ROBERT','JASON')

    Returns 0, which is nothing in common at all.

    http://msdn.microsoft.com/en-us/library/aa258844(SQL.80).aspx

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply