• Chris I was just playing with the CTE concept as I am quite new to TSQL.

    Moving forward part of the learning process is to know when to employ the correct method as a solution for the problem.

    Many thanks for your input.

    Phil

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper