View Single Post
Old 27-11-2007, 08:31 PM   #4
wdudek
Guest
 
Posts: n/a
RE: full text search on multiple columns

I was hoping that I wouldn't need to use an OR statement, but I think you
answered my question. Essentially I wanted to use the predicate contains(*,
'*ABC* OR *08117*') where the asterik for the column list would indicate
several columns, some that may have the valeus and some that would not in one
or more records. If an OR statement and multiple contains statements is the
only way to do this, I will continue to concatenate the data into a seperate
field, which is ok as this database is only used for performing searches.

Thanks,

"Charles Wang[MSFT]" wrote:

> Hi Bill,
> I understand that you would like to return the rows that have the value in
> any of the columns.
> If I have misunderstood, please let me know.
>
> To narrow down this issue, could you please let us know what your T-SQL
> statement was? Did you try OR statement? For example:
> SELECT *
> FROM tblText
> WHERE CONTAINS(account_number, @searchword)
> OR CONTAINS(account_name, @searchword)
> OR CONTAINS(order_number, @searchword)
>
> Please feel free to let me know if you have any other questions or
> concerns. Have a nice day!
>
>
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ================================================== ===
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ================================================== ====
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ================================================== ====
>
>
>

  Reply With Quote