@Alban Lijo
You might want to have a look at the articles I pointed at in my previous post.
I guess the approach described in those articles will be "slightly faster" than your current solution... 😉
Lutz
A pessimist is an optimist with experience. How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]