• Con Alexis thank you sir. That's what I was looking for. Sorry for the late reply, yesterday was my birthday.

    Luis. It's for an article I'm working on. I have a tally table based version and wanted to compare the performance to a CLR. I figured that a more people who could write CLRs would understand the procedural code.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001