| Author |
Multiple Keyword Search using SQL PROC
|
|
| David Lozzi 2005-07-28, 9:10 am |
| 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
| |
| Eliyahu Goldin 2005-07-28, 5:03 pm |
| 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
"David Lozzi" <dlozzi@(removethis)delphi-ts.com> wrote in message
news:eV8kGD4kFHA.576@TK2MSFTNGP15.phx.gbl...
> 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
>
>
| |
| David Lozzi 2005-07-28, 5:03 pm |
| How?
"Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
news:%23vgwXL4kFHA.1412@TK2MSFTNGP09.phx.gbl...
> 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
>
> "David Lozzi" <dlozzi@(removethis)delphi-ts.com> wrote in message
> news:eV8kGD4kFHA.576@TK2MSFTNGP15.phx.gbl...
> simple
> search
>
>
| |
| Eliyahu Goldin 2005-07-28, 5:03 pm |
| 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
"David Lozzi" <dlozzi@(removethis)delphi-ts.com> wrote in message
news:uF5cgV4kFHA.1412@TK2MSFTNGP09.phx.gbl...
> How?
>
>
> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
> news:%23vgwXL4kFHA.1412@TK2MSFTNGP09.phx.gbl...
doing[color=darkred]
>
>
| |
| Sreejith Ram 2005-07-28, 5:03 pm |
| I tend to believe, the string maniputaion functions of .NET will be more
efficient and richer than t-sql or pl-sql
"Eliyahu Goldin" wrote:
> 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
>
> "David Lozzi" <dlozzi@(removethis)delphi-ts.com> wrote in message
> news:eV8kGD4kFHA.576@TK2MSFTNGP15.phx.gbl...
> simple
> search
>
>
>
| |
| Eliyahu Goldin 2005-07-28, 5:03 pm |
| Likely. But stored procedures are pre-compiled. And the database server
usually is big and fast.
Eliyahu
"Sreejith Ram" <SreejithRam@discussions.microsoft.com> wrote in message
news:EF338099-9AF6-4152-8008-60EFDC5AB4C2@microsoft.com...[color=darkred]
> I tend to believe, the string maniputaion functions of .NET will be more
> efficient and richer than t-sql or pl-sql
>
>
> "Eliyahu Goldin" wrote:
>
doing[color=darkred]
to[color=darkred]
What do[color=darkred]
| |
| Sreejith Ram 2005-07-28, 5:03 pm |
| 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
"Eliyahu Goldin" wrote:
> Likely. But stored procedures are pre-compiled. And the database server
> usually is big and fast.
>
> Eliyahu
>
> "Sreejith Ram" <SreejithRam@discussions.microsoft.com> wrote in message
> news:EF338099-9AF6-4152-8008-60EFDC5AB4C2@microsoft.com...
> doing
> to
> What do
>
>
>
| |
| Eliyahu Goldin 2005-07-31, 4:01 am |
| I mean stored procedures are pre-compiled on the database server. That makes
the database call faster.
Eliyahu
"Sreejith Ram" <SreejithRam@discussions.microsoft.com> wrote in message
news:00D16120-E67F-4383-82A2-656D85AEDB1C@microsoft.com...
> 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[color=darkred]
>
> thanks
> Sreejith
>
> "Eliyahu Goldin" wrote:
>
more[color=darkred]
perform[color=darkred]
just[color=darkred]
entire[color=darkred]
need[color=darkred]
|
|
|
|