Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
1,108 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

916 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