Hi This is madhavi
am working with a project with ASP.NET Using
VB.NET..
i have requirement that i have to provide the result based on search condition....
First : For Serach i have to search based on given CITY and CATEGORY....
For this i have written a StoredProcedure like:
************************************************** ************************************************** **************
Create PROCEDURE YellowPages_Search
(
@city nvarchar(50),
@SearchWord nvarchar(200),
)
AS
declare @sql nvarchar(1000)
set @sql='select * from YellowPages_Userdetails where city='''+@city + '''and (category like ''%' + @SearchWord + '%'' or subcategory like ''%' + @SearchWord + '%'') '
exec(@sql)
GO
************************************************** ************************************************** ************************************************** *******************
Now i want to extend this search condition for LOCATION and SUBCATEGORY
means my search condition should include CITY , LOCATION , CATEGORY and SUBCATEGORY
(here the location and subcategory may be given or may not be given)
means the search should be based on
1: city=something and category/subcategory=something
2: city=something and ctegory=something and location=nothing and category=nothing
3: city=something and ctegory=something and location=something and category=nothing
4:city=something and ctegory=something and location=something and category=something
5:city=something and ctegory=something and location=nothing and category=something
so please help me out
Thanks in Advance,
Madhavi