I am doing a simple update statement but am getting an error.
Cannot create a row of size 10675 which is greater than the allowable maximum of 8060.
The statement has been terminated.
I am inserting data that is as big as 7500 characters into a varchar(7500) field. I have made sure that my column is 7500 in length. the only way it fits is if I cut it down to 4950 characters...
Any Ideas?
William,
Total columns length for row is max 8060 (not a single column). Maybe you would want to put your new concatenated string into a text/ntext column.
PS: BTW check another thread about concatenating text fields earlier today.
|||In SQL Server 2000, the entire row's data must be <= 8060 bytes, not just a single column. (this allows it to fit on a single page)
In SQL Server 2005, you can put > 8060 bytes on a row, but it is not advisable in most cases. Any rows that are larger than that spill over into a different page.
|||I know about the limitation and I implement restrictors to make sure my working tables do not go over the given length that I need.
My data has a max length of 7500 because I populated the field with another process that only allows the data to be 7500 in length. So I do not know how the data is growing...
I am just setting a column (varchar 7500) to the value of another column (varchar 7500) and that is what does not make sense to me.
|||Can you post the script of the table?|||this table gets populated by a process that limits the data to 7500
CREATE TABLE [dbo].[Search_hold] (
[id] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[credits] [varchar] (7500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
When I do a simple update to this table is where I get the error... I am only posting the column that is effected because the table is 30+ columns wide....
CREATE TABLE [dbo].[Search] (
[prod_id] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[credits] [varchar] (7500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[srch_field] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[dateadded] [smalldatetime] NULL ,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
The first table is to get the data and the main table is the second one. Alot more data is in the table that these columns...
No comments:
Post a Comment