It's not clear to me what you're looking for.
What rows do you want to return?
Simple scenario:
col1col2
A11
A12
A23
A24
What would be your expected output?
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]