Searching a list of words in multiple columns Constraint : Each word must exist in one of them
- From: jain.rajat@xxxxxxxxxxxxxx
- Date: 10 Jan 2006 01:18:34 -0800
Hi!
I have a requirement where I need to pass in the list of words (could
be separated by space) and then I need to find all the rows in SQL
which have each of these words in any of the 4 columns.
Table ContactDetail
columns addressLine1, addressLine2, Town, Country
It can have data like:
1. 32 Royal street, whateverlane, whatevertown, mycountry
2. cologne street, lane no. 5, anothertown, anothercountry
3, mycountry street, anotherlane, anothercountry
Now incase the user searches for 'whateverlane 32' only row 1 should
return.
Incase the user searches for 'mycountry' both rows 1 and 3 should
return.
Basically all the keywords entered must appear in a row in any of the
columns.
I have created a stored procedure which creates a temporary table of
these words. I think after this I need to make use of containstable,
but I am not clear on how.
Any help in this will be appreciated.
Thankx,
Rajat
.
- Follow-Ups:
- Prev by Date: Re: how to add support for russian language to Full Text search?
- Next by Date: Re: failed with unknown result
- Previous by thread: Re: how to add support for russian language to Full Text search?
- Next by thread: Re: Searching a list of words in multiple columns Constraint : Each word must exist in one of them
- Index(es):
Loading