Information from the SQL Server Books Onine (SELECT, ORDER BY clause):
There is no limit to the number of items in the ORDER BY clause. However,
there is a limit of 8,060 bytes for the row size of intermediate worktables
needed for sort operations. This limits the total size of columns specified
in an ORDER BY clause.
You should set the column width accordingly.
--
Martin C K Poon
Senior Analyst Programmer
====================================
"Stimp" <ren@spumco.com> ¦b¶l¥ó
news:slrne3u0f8.vf.ren@carbon.redbrick.dcu.ie ¤¤¼¶¼g...
[quoted text, click to view] > I've recently started getting the following error when I retrieve
> long text entries from my MS SQL Server database...
>
> "Cannot sort a row of size 8150, which is greater than the allowable
> maximum of 8094"
>
> I have one column in one of the tables involved in the SELECT statement
> that has a maximum of 8000 characters.
>
> Should I resize this column to 7800 or similar, to avoid this problem,
> or should I modify my SELECT statement to ignore the errors and proceed
> as normal?
>
> Thanks.
> --
>
> fiddlewidawiddum