Hi Erland,
Someone else (I'm not sure it was Rizyak) posted a simalar question on
REGEXP recently in the fulltext newsgroup and I replied to it, with
recommendations to use LIKE and to review the BOL titles "Pattern Matching
in Search Conditions" and "PATINDEX" as well as "Comparing CHARINDEX and
PATINDEX" as SQL Full-text Search (FTS) is not designed for string pattern
matching such as you would get with REGEXP. FTS is more of a word-based
search method vs. T-SQL LIKE's pattern-string method. So, hopefully between
us he or they got their answer... Bellow is an Patindex T-SQL example:
use Northwind
select Description from Northwind.dbo.Categories
where patindex('%[b,B]read%',description) > 0
and patindex('_[^e]%',description) = 1
/* -- returns:
Description
---------------------------------------
Breads, crackers, pasta, and cereal
(1 row(s) affected)
*/
Note, you can also post FTS related questions to the newsgroup:
microsoft.public.sqlserver.fulltext
Regards,
John
"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn*********************@127.0.0.1...
Rizyak (ry**********@latitude47.comANDMETOO) writes: hmmm, is there a way to search multiple fields for keywords?
I want to search an entire table for a keyword if possible.
If you are actually using SQL Server, you may investigate whether
full-text search can meet your needs. I have never used the feature myself, though.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp