• Thanks Sean for that.

    Infact I wanted unique counts of the document types, so I took the distinct data into a temp table and then using your SQL queried from that to give month-by-month totals.

    Almost forgot the dynamic "sum".

    And thanks for the ddl example, I will remember to post data like that.

    Bij