Error 1540 when querying database

  • I have an existing table with a field of varchar(8000) when I query against the database from a report, it returns an error with the description of "Cannot sort a ros of size 8722, which is greater than the allowable maximum of 8094." I understand the error, is there a way to fix this?

    Can I convert the field to a Text datatype and not lose any information and will it work then?

    Any ideas would be welcome.

    Thanks,

  • Can you run the query from Query Analyzer?

  • Does the query join other tables? If the total size of the result set is larger than 8060, you will get a similar error. In that case, you will have to reduce the number of columns selected, or reduce the size of one or more character columns.

  • Thanks for the replied. I think I have found a solution by changing the data type to 'Text'. I don't seem to have lost any data in the conversion, but I am still checking.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply