• " ... Thanks for any input ..."

    I hate "Order by 1" type code. Why not put the column name so it's clear ?

    And no comments and meaningless temp table names ... Very frustrating for anyone else that has to work on it.