Nice job Alan.
A few years ago DC and I played with numerous variations of this method as a spinoff of the PatternSplit project. One of the most promising methods was a QU using an inline tally table, where the inline variable is the product, rather than values in the table. I remember it was very fast and made for nice slim maintainable code too.
I tried a similar method with the QU and inline tally table which did not perform well, it did very badly actually. I'll send it to you, I'd be interested to see where I went wrong.
It's so cool that you guys played around with this, it's such a fun exercise and great way to sharpen your SQL skills.
"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