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...Vowels are ignored in the comparison. Nonalphabetic characters are used to end the comparison.
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.
is pronounced ree-bar and is a Modenism for R
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs