Multiple Keyword Search using SQL PROC

  • Thread starter Thread starter David Lozzi
  • Start date Start date
D

David Lozzi

I need to support multiple keyword search, not boolean searchs, just simple
searches, i.e. "marhsall ma". How is this done? Do I send the entire search
string to the Proc? How do I deal with it there? I'm thinking I need to
build the WHERE clause in the code behind and send it to the proc. What do
you think?

Thanks,

David Lozzi
 
How?


Eliyahu Goldin said:
David,

You can build the where in the code, as you say. I personally prefer doing
this sort of things in stored procedures, if possible. It should perform
better. Pass one string and parse it in the sp.

Eliyahu
 
I tend to believe, the string maniputaion functions of .NET will be more
efficient and richer than t-sql or pl-sql
 
David,

You can build the where in the code, as you say. I personally prefer doing
this sort of things in stored procedures, if possible. It should perform
better. Pass one string and parse it in the sp.

Eliyahu
 
How to parse? Using the language you are writing stored procedures in.
Usually it is Transact-SQL and it has a standard set of string functions.

Eliyahu
 
Likely. But stored procedures are pre-compiled. And the database server
usually is big and fast.

Eliyahu
 
Not to argue, just trying to express my understanding...

it is the same case if I build the query in code behind too.. code behind
is compiled (to IL) and big websites run on webfarm, but database servers are
usually just 1 or 2..

building the query dynamically in .NET also helps to make debugging easier

thanks
Sreejith
 
I mean stored procedures are pre-compiled on the database server. That makes
the database call faster.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top