Multiple Keyword Search using SQL PROC

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
 
D

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
 
G

Guest

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

Eliyahu Goldin

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
 
E

Eliyahu Goldin

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
 
E

Eliyahu Goldin

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

Eliyahu
 
G

Guest

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
 
E

Eliyahu Goldin

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top