• Jeff Moden (9/25/2012)


    Careful now... Because of the date conversions to the CHAR datatype, that will be relatively slow.

    It is beautiful though - this has long been a favourite of mine (I think it was Rob Farley that first showed it to me).

    As far as performance is concerned, well yes it will be slow. But then, all T-SQL solutions will be slow, right? 😉

    Just kidding (mostly) - it's a good point that conversion to string is particularly bad. And especially scalar T-SQL UDFs :sick: