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,068 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
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now