• Looks like it's to do with the way the command string is being built. Perphaps you could put a line in your code to print the command string before it's executed? What is the "+':00'" at the end for? If you're trying to append ":00" on to the end of a number, you need to do something like this:

    SELECT CAST(COUNT(*) AS varchar(6)) + ':00'

    ...

    John