>Ok, this proved that UDF is the slowest thing and inline functions are much better using CROSS APPLY technique. Looks like George may want to update his blog.
Looks to me that with all the research you have done, you might consider starting a document on your own. lol But, yes, I thought about the same thing when I saw the first two were faster than the UDF function.
>BTW, take a look at the new variation I posted - I think Brad's code is easier to read than mine.
I am not sure about that. The one I have now seems to be easier to understand, is pretty much about the same number of lines of code, if not less, and it works as is.