Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Search function for a SQL DB

Status
Not open for further replies.

dseaver

IS-IT--Management
Jul 13, 2006
467
My team is trying to create a search function to be used in a webpage for administration of our db. We want to search a number of columns in a number of different tables. It would not be the same column in all the tables, some columns do not provide useful data for searching. What would be the best way of implementing this search function? Going to be programming the interface for the DB in C#2005. Thanks in advance
 
Write a stored procedure for each type of search you want to do, and join whichever tables are relevant. You can use optional parameters if you need to.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
What about using full text search? Would that be easier/more useful? I'm starting to read up on it now
 
Only if you need to. If you know which columns you will be searching, what data could be in the columns, and you are searching indexed fields then this would be faster than a full text search. We don't know your structure or data so it's hard to say what you need to do.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top