Sorry for the delay in responding, my broadband has been in and out all day today and the Virgin Service Engineer is coming to have a look at it tomorrow.
Unusually I also didn't get an email telling me you had posted.

I will take a look at your database and get back to you, have you included an example of the output you want?