• Many thanks for the script.

    For anyone interested - In order to get the datetime stamps to return seconds (and milliseconds) I had to change the following:

    else if @ColType in (58, 61) -- dates (nulls not supported yet)

    set @ValList = @ValList + ' ''''''+convert(varchar(200),' + @ColName + ')+'''''''

    TO

    else if @ColType in (58, 61) -- dates (nulls not supported yet)

    set @ValList = @ValList + ' ''''''+convert(varchar(200),' + @ColName + ',13)+'''''''

    Of course any CONVERT style code can be used.