• The code posted contains a lot of errors. Misspelled procedure names, missing columns, wrong aliases.

    I don't have time to do the error checking right now, but will post my findings/corrections later today (if it is not done by then...)