• I just tried a query like

    SELECT ID, string FROM test

    INNER JOIN containstable(test, string, 'C#')

    AS KEY_TBL ON test.ID = KEY_TBL.

    It is very interesting that it returns correct results on SQL Server 2012, but ignores # on SQL Server 2008.

    andyscott (2/10/2014)


    However (BIG however).....

    If you change the above script and replace all instances of C# with, say, X# and all instances of C++ with X++ then you'll find that it doesn't work any more. What this means is that Microsoft must have a list of "words" that full text indexing is able to pick up on: if your search terms, as in the OP, are included in that list then you're fine, but if they are not then you're no further forward. Someone with more experience of full text editting can probably tell you if and how you might control the "word list"........

    Maybe there is some internal English dictionary which contains all "real" words.

    It looks like all words that I need are included in that list, so I am fine with it.

    Thanks guys! 😎