Ok, try dropping the view and then create the view by using the following SQL. BTW, try backing up the database as often as possible
CREATE VIEW [dbo].[vw_DSC_Category_Count] WITH SCHEMABINDING
AS
SELECT dbo.DSC_Category.categoryId, SUM(dbo.DSC_Category_Manufacturer_Count.count) AS count, COUNT_BIG(*) AS recordCount
FROM dbo.DSC_Category INNER JOIN
dbo.DSC_Category_Manufacturer_Count ON dbo.DSC_Category.categoryId = dbo.DSC_Category_Manufacturer_Count.categoryId
GROUP BY dbo.DSC_Category.categoryId
CREATE UNIQUE CLUSTERED INDEX [IK_vw_DSC_Category_Count] ON [dbo].[vw_DSC_Category_Count] ([categoryId]) WITH (STATISTICS_NORECOMPUTE=ON) ON [PRIMARY]
DotShoppingCart Staff
|