• CELKO (12/14/2012)


    [ Yiikes, that's incredibly convoluted. What a royal pita to try to understand, much less change or debug later!!

    But it is fast and portable 😀

    On a more serious note, that kind of function nesting used to be standard idioms in early SQL. If you can find some articles and books by David Rozenshtein, he did a lot of stuff with it to create the Characteristic function, etc.

    Yeah, and we used to use punch cards and write our own bubble sorts too. For me to use something that indecipherable, there'd have to be a noticeable performance diff.

    As to "portable", that really is a myth. There are so many custom approaches in each variant of SQL you can never port anything easily.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.