Glad it worked out for you 😀
Once you figured how ROW_NUBER and its sibling (RANK and DENSE_RANK) work, all come in really handy. 😉
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]