first, I will practice your two examples thanks. Second the code worked perfectly. I will research the WITH statement to understand your solution. Seems very similar to the union statement I was trying to use (which did not work) but of course yours worked. Thank you very much.