• Sean Lange (4/5/2013)


    I knew it was limited but I didn't realize it is that useless. I have never really had a reason to need it so have never really tested the limitations very much.

    I'm probably not giving it enough credit for whatever its intended use may have been but I've really been disappointed by it. From BOL...

    [font="Arial Black"]Vowels are ignored in the comparison. Nonalphabetic characters are used to end the comparison.[/font]

    In other words, a dash or a space or a digit or just about any punctuation will stop the comparison. That means either it does just the first word or first part of a hyphenated word.

    These are probably bad examples of what I don't like about it, but it's the best I can do on short notice.

    SELECT DIFFERENCE('Glif', 'Geoffrey');

    SELECT DIFFERENCE('Glare', 'Geoffrey');

    Because none of the vowels (including the letter "y" in this case), are considered, these two comparisons are both given a "3 out of 4" as a match. That's usually nowhere near close enough for my purposes.

    Then take the following example which is just about spot on.

    SELECT DIFFERENCE('Geoffrey', 'Mr Geoffrey');

    That's only given a "2" because only the "Mr" of the second operand is evaluated because any non-alphabetic character, including a space, will stop the comparison.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)