If you want to implement fulltext on view you might readt it....


CREATE VIEW [dbo].[FetchStockInformation] WITH SCHEMABINDING
AS
SELECT     B.BrandName, I.ItemName, C.ItemCatName, S.SubCatName, I.ReOrderLevel, SUM(M.Qty) - SUM(PD.Qty) AS Qty
FROM         dbo.tblmrnchild AS M INNER JOIN
                      dbo.tblBrandMaster AS B ON B.BrandID = M.BrandId INNER JOIN
                      dbo.tblItemMaster AS I ON M.ItemId = I.ItemID INNER JOIN
                      dbo.tblCategoryMaster AS C ON M.CategoryId = C.ItemCatID LEFT OUTER JOIN
                      dbo.tblSubCategory AS S ON S.SubCatID = M.SubCategoryId LEFT OUTER JOIN
                      dbo.tblPurchaseDetailsByUser AS PD ON PD.ItemID = M.ItemId LEFT OUTER JOIN
                      dbo.tblPurchaseByUser AS P ON P.PurchaseID = PD.PurchaseID
WHERE     (P.IsDeliverd = 'N')
GROUP BY B.BrandName, I.ItemName, C.ItemCatName, S.SubCatName, I.ReOrderLevel

--GO
--select * from FetchStockInformation
drop view [FetchStockInformation]


CREATE UNIQUE CLUSTERED INDEX PK_FetchStockInformation ON [dbo].[FetchStockInformation](ItemName)
GO

EXEC sp_fulltext_database  'enable'
EXEC sp_fulltext_catalog   'FetchStockInformationCatalog','create'
EXEC sp_fulltext_table     'FetchStockInformation', 'create', 'FetchStockInformationCatalog', 'PK_FetchStockInformation'

EXEC sp_fulltext_column    'FetchStockInformation', 'BrandName','add'
EXEC sp_fulltext_column    'FetchStockInformation', 'ItemName','add'
EXEC sp_fulltext_column    'FetchStockInformation', 'ItemCatName','add'

EXEC sp_fulltext_table     'FetchStockInformation','activate'
EXEC sp_fulltext_catalog   'FetchStockInformationCatalog', 'start_full'




Comments

Popular posts from this blog

How to create RSS Feed in Asp.Net

Auto generate change scripts in SQL Server Management Studio SSMS for tables

HOW TO Use the NumericUpDown Control