Quote Originally Posted by Gicu View Post
Please have a look at the attached sample, it should give you what you want but strongly recommend a redesign of your db based on the suggestions received above.

Cheers,
Vlad
You are genius sir. God bless you so much. Cheers.