How to create a search criteria with option to narrow your search
Hi there,
I have got a postcodes table which contains the postcodes and the street(s) associated with it. I have got a child table which contains the full address of a business, a commercial building or residential building etc.
My reuirement is that on asp.net the users can enter the post code and all the addresses associated with that post code should be displayed. Which is very easy to achieve. But the problem comes when users try to search a specific business with in that postcode.
For example the criteria can be
Search me a macdonalds in SK4 1BS or search me macdonalds and pizza hut in SK4 1BS and the list of the businesses can expand in search criteria.
Can you please help how do i achieve this? as i am confused that in my stored procedure i can not give here an and condition in where clause because the user can leave the business field blank.
The fron end asp.net has also got a plus button to add more text boxes to be included in search criteria. But all the text boxes will only allow to enter the business.
Best regards,
Microsoft SQL Server 2005ASP.NETC#
Last Comment
Sara bhai
8/22/2022 - Mon
jogos
where business like '%'+isnull(@searchstring,'')+'%'