Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL err0r 1540 - Cannot Sort Row

Status
Not open for further replies.

Laneyh

Technical User
Jul 12, 2001
8
GB
Getting Ole error Cannot sort a row of size 8164, which is greater than the allowable maximum of 8094
When trying to run a Select query
Any ideas on the cause of this or if there is a way to increase maximum size ?
 

There is no way to increase the sort size. Does your query have a DISTINCT, GROUP BY or ORDER BY clause? You will need to reduce the number of columns in a select list and/or GROUP BY or ORDER BY clause.

If you have a UNION, SQL sorts the entire row. You can stop the sort by adding ALL to the UNION clause. Of course, SQL will no longer eliminate duplicates.

Select * from table1
UNION ALL
Select * from table2 Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top