Solved

MS SQL: Cannot sort a row of size 8096, which is greater than the allowable maximum of 8094

Posted on 2009-07-05
2
1,087 Views
Last Modified: 2012-05-07
SQL 2K:

I changed datatype of ItemDescription nvarchar to varchar (4000). I m using Inner Join Query Where I have to use
"Select t1.Itemdesction , t2.ItemDescription, t3.ItemDescription from ItemMaster....".

 I am getting error

" Cannot sort a row of size 8096, which is greater than the allowable maximum of 8094"

I tried to change datatype back to nvarchar , its giving error while saving :

'ItemMaster' table
- Unable to modify table.  
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot create a row of size 9517 which is greater than the allowable maximum of 8060.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
0
Comment
Question by:Harsh08
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 24782789
change it to text data type


It looks like you have too much data in the row already.
What is the total size of the other columns?
SQL Server will allow you to define a column of a variable length size, that
could end up leading to errors on insert or update.

For example, you could create a table that has 10 varchar(8000) columns,
with no error.
But if you tried to insert 8000 bytes into 2 of those columns, you would get
an error.

The only way in SQL 2000 to have more than 8060 bytes in a row is to use the
text data type.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24783008
Check out the solutions given earlier in EE itself:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_11173651.html

Hope this helps
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question