Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Dynamically Created Stored Proc for a site search with asp parsing

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-01 : 08:55:55
Matt writes "Hello,

I am running windows 98 with sql server 2000 trial version. I am using temp tables for paging on a site. This works well when I am selecting a group of items by a group_id because I know the number of parameters. I would like to know if there is a way for me to take a user's keywords for a search, parse them and run a stored proc that will be able to create a temp table of the results. I am parsing the keywords by the space character so that I can search for the phrase as well as the individual words. I understand how to write the SQL using ASP and looping, but I do not know how to parse an unknown number of words in a string and have a stored proc search for the phrase as well as each individual words. If a user enters 'books' then I want it to seach for the keyword 'books' in 3 or 4 fields, if they enter 'SQL 2000 books' I would want the proc to search for that phrase as well as 'SQL', '2000', 'books' in several fields. If you need clarification on what I mean please ask. I know there is the cumbersome method of doing it all with SQL within an ASP page but is there a way to use a stored proc to accomplish the same thing?

Matt"

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-05-01 : 08:55:55
Here's how we do searching: http://www.sqlteam.com/item.asp?ItemID=1876
Go to Top of Page
   

- Advertisement -