CREATE proc spSearchProduct @searchWord1OnMasterPage nvarChar(50), @searchWord2OnMasterPage nvarChar (50), @searchWord3OnMasterPage nvarChar (50), @searchWord4OnMasterPage nvarChar (50) as Begin Select Product.Name,Price,Seller,ProductStreetNo.StrNo,ProductStreet.StreetName from Product INNER JOIN ProductStreetNo ON Product.StreetNoID = ProductStreetNo.IDStreetNo INNER JOIN ProductStreet ON Product.StreetID = ProductStreet.IDStreet INNER JOIN ProductState ON StateID=ProductState.IDState INNER JOIN ProductCity ON CityID=ProductCity.IDCity where Product.Name Like '%' + @searchWord1OnMasterPage + '%' and ProductState.StateName Like '%' + @searchWord2OnMasterPage + '%' and ((ProductCity.CityName Like '%' + @searchWord3OnMasterPage + '%' )or (ProductStreet.StreetName Like '%' + @searchWord4OnMasterPage + '%') or (ProductStreet.StreetName is null)) and ((ProductCity.CityName Like '%' + @searchWord3OnMasterPage + '%' )or (ProductStreet.StreetName Like '%' + @searchWord4OnMasterPage + '%') or (ProductStreet.StreetName is null)) End
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)