• Thanks Sean,

    I completely understand and if no-one can help I don't blame them, this question is more of a curiosity for me as I can work around the issue and that is sufficient. Unfortunately my company considers code such as this as its IP for a product that they've developed. I understand that without the code it is almost impossible to debug, so perhaps it would have been better to try to understand why SELECT TOP XXX would be different from a SELECT without a "top" number of rows when XXX is greater then the number of rows that query produces. Or even why adding ",*" to the end of the fields being selected would change the behavior of the query to prevent the conversion error?