Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 CONTAINS with special character period

Author  Topic 

lleemon
Starting Member

24 Posts

Posted - 2014-09-25 : 15:53:57
I have a resume table and want to find people that have the following in their resume: B.A. or BA

If I do the below it doesn't seem to find the period option.
SELECT * FROM TABLE1 WHERE CONTAINS(FIELD2, '" B.A. " OR " BA "')

I tried but didn't work:
SELECT * FROM TABLE1 WHERE CONTAINS(FIELD2, '" B\.A\. " OR " BA "')

The period (.) doesn't appear in my stoplist either.

Thanks.
Lee

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-09-25 : 16:38:57
why not just use LIKE:

[code]
where FIELD2 LIKE '% B.A. %' OR FIELD2 LILE '% BA %'
Go to Top of Page
   

- Advertisement -