I am stuck and I can not figure out. Does anyone have any ideas? I would greatly appreciate any help.
I have a table in SQL Server 2008 with the following defintion:
I can insert/delete/update without any error. However, when i run a select statement that filter out ONE single item, i got the following error:
Msg 511, Level 16, State 1, Line 1 Cannot create a row of size 8104 which is greater than the allowable maximum row size of 8060.
If I remove the where condition a15.MEMBER_PARENT_LEVEL_ID4 in (91329)
it ran fine. If I add 5 or 10 criterias it ran fine, including the one that is throwing the error if you add it by itself.
[MSTR_PROD_HIER_ID] [int] NOT NULL,
[MSTR_PROD_HIER_DESC] [varchar](50) NULL,
[MEMBER_GROUP_LEVEL_ID1] [int] NULL,
[MEMBER_GROUP_LEVEL_DESC1] [varchar](60) NULL,
[MEMBERKEY_SORT1] [int] NULL,
[MEMBER_GROUP_LEVEL_ID2] [int] NULL,
[MEMBER_GROUP_LEVEL_DESC2] [varchar](60) NULL,
[MEMBERKEY_SORT2] [int] NULL,
[MEMBER_GROUP_LEVEL_ID3] [int] NULL,
[MEMBER_GROUP_LEVEL_DESC3] [varchar](60) NULL,
[MEMBERKEY_SORT3] [int] NULL,
[MEMBER_LEVEL_ID4] [int] NULL,
[MEMBER_LEVEL_DESC4] [varchar](60) NULL,
[MEMBER_LEVEL_DESC4_1] [varchar](60) NULL,
[MEMBER_PARENT_LEVEL_ID1] [int] NOT NULL,
[MEMBER_PARENT_LEVEL_DESC1] [varchar](60) NULL,
[SORT1] [int] NULL,
[MEMBER_PARENT_LEVEL_ID2] [int] NULL,
[MEMBER_PARENT_LEVEL_DESC2] [varchar](60) NULL,
[SORT2] [int] NULL,
[MEMBER_PARENT_LEVEL_ID3] [int] NULL,
[MEMBER_PARENT_LEVEL_DESC3] [varchar](60) NULL,
[SORT3] [int] NULL,
[MEMBER_PARENT_LEVEL_ID4] [int] NULL,
[MEMBER_PARENT_LEVEL_DESC4] [varchar](60) NULL,
[SORT4] [int] NULL,
[CLASS_DESC] [varchar](60) NULL,
[CLASS_DESC1] [varchar](50) NULL,
[TOTAL_BRAND_IND] [int] NOT NULL
}
{
select a11.PlanFormat PlanFormat,
max(a18.FormatName) FormatName,
a15.MEMBER_PARENT_LEVEL_ID2 MEMBER_PARENT_LEVEL_ID2,
max(a15.MEMBER_PARENT_LEVEL_DESC2) MEMBER_PARENT_LEVEL_DESC2,
a15.MEMBER_PARENT_LEVEL_ID3 MEMBER_PARENT_LEVEL_ID3,
max(a15.MEMBER_PARENT_LEVEL_DESC3) MEMBER_PARENT_LEVEL_DESC3,
a15.MEMBER_PARENT_LEVEL_ID4 MEMBER_PARENT_LEVEL_ID4,
max(a15.MEMBER_PARENT_LEVEL_DESC4) MEMBER_PARENT_LEVEL_DESC4,
max(a15.CLASS_DESC) CLASS_DESC,
max(a15.CLASS_DESC1) CLASS_DESC1,
a16.MSTR_SEASON_ID MSTR_SEASON_ID,
max(a16.MSTR_SEASON_DESC) MSTR_SEASON_DESC,
max(a16.MSTR_SEASON_DESC1) MSTR_SEASON_DESC1,
a17.MSTR_STORE_ID MSTR_STORE_ID,
max(a17.MSTR_STORE_DESC1) MSTR_STORE_DESC1,
a13.MSTR_C_MNTH_ID MSTR_C_MNTH_ID,
max(a13.MSTR_C_MNTH_DESC) MSTR_C_MNTH_DESC,
a13.MSTR_CALENDAR_GRP_ID MSTR_CALENDAR_GRP_ID,
max(a13.MSTR_CALENDAR_GRP_DESC) MSTR_CALENDAR_GRP_DESC,
a12.YEAR_NBR YEAR_NBR,
a11.PlanNo PlanNo,
max(a18.PlanName) PlanName,
sum((a11.Value1821 / 1000.0)) ACT_PROJ_SLS_DOL
from A_MSTR_PLAN_FCT a11
join A_MSTR_CALENDAR_MONTH_XREF a12
on (a11.Member2 = a12.Member2)
join A_MSTR_CALENDAR_MONTH a13
on (a12.DIM_TIME_ID = a13.DIM_TIME_ID and
a12.YEAR_NBR = a13.YEAR_NBR)
join A_MSTR_PRODUCT_LEVEL_3 a14
on (a11.MEMBER0 = a14.P_MEMBER3)
join A_MSTR_PRODUCT_LEVEL_3_PARENT a15
on (a14.MEMBER_LEVEL_ID4 = a15.MEMBER_LEVEL_ID4 and
a14.MSTR_PROD_HIER_ID = a15.MSTR_PROD_HIER_ID)
join A_MSTR_SEASONALITY a16
on (a11.MEMBER3 = a16.MEMBER3)
join A_MSTR_STORE a17
on (a11.MEMBER1 = a17.MEMBER1)
join A_MSTR_PLAN a18
on (a11.PlanNo = a18.PlanNo and
a12.YEAR_NBR = a18.YEAR_NBR and
a13.YEAR_ID = a18.YEAR_ID)
where (a11.PlanNo in (1547)
and a15.MEMBER_PARENT_LEVEL_ID4 in (91329))
group by a11.PlanFormat,
a15.MEMBER_PARENT_LEVEL_ID2,
a15.MEMBER_PARENT_LEVEL_ID3,
a15.MEMBER_PARENT_LEVEL_ID4,
a16.MSTR_SEASON_ID,
a17.MSTR_STORE_ID,
a13.MSTR_C_MNTH_ID,
a13.MSTR_CALENDAR_GRP_ID,
a12.YEAR_NBR,
a11.PlanNo
}
This is a follow up. to my previous post. As i mentioned below, this error goes away after i dropped the table, perform DBCC clean up and recreate the table. Now, it is coming back but this time, only when you select two or more criterias. The problem seems to be with the where condition where it filter out my product. My product table does not have any nvarchar or varbinary. I am so frustrated... :-(