Groups | Blog | Home
all groups > sql server full text search > january 2007 >

sql server full text search : Search string with percent sign %


John S.
1/29/2007 8:00:00 AM
We have a database full of grocery items that we're trying to search. When I
search for "*1%*" it seems that the percent sign is ignored and I get back
all the rows that match "*1*" (which is A LOT). Is there anyway I can tell
John S.
1/29/2007 8:04:00 AM
i should mention this is Sql 2000 on Win2k

[quoted text, click to view]
John S.
1/29/2007 4:34:01 PM
Hi Simon,
I also forgot to mention that I need to do this with CONTAINSTABLE.

[quoted text, click to view]
Simon Sabin
1/29/2007 10:33:32 PM
Hello John S.,

Try LIKE '*1[%]*'

This is explained in BOL

Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons


[quoted text, click to view]

Simon Sabin
1/30/2007 11:22:18 AM
Hello John S.,

I don't think you can as % is considered an ignored character.

In addition you can't do searches with a preceeding wild card

"*simon" is not valid whilst "simon*" is.


Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons


[quoted text, click to view]

AddThis Social Bookmark Button