Note that there are some explanatory texts on larger screens.

plurals
  1. POCONTAINSTABLE query not recognising small words
    primarykey
    data
    text
    <p>I'm using <a href="http://msdn.microsoft.com/en-us/library/ms189760.aspx" rel="nofollow"><code>CONTAINSTABLE</code></a> to search two table columns. Once the search contains small words like 'the' 'for' 'a' the search returns no results even when they are actually present in the column.</p> <p>Quick example. Column being searched contains the text. 'System needs to be upgraded'</p> <p>Following SQL returns 0 rows</p> <pre><code>SELECT * FROM Incident WHERE (TicketNumber IN ( SELECT TicketNumber FROM [Action] FT_TBL INNER JOIN CONTAINSTABLE(Action, Text, '"system" AND "needs" AND "to" AND "upgraded" AND NOT "Search Summary"') KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY] UNION SELECT TicketNumber FROM [Incident] FT_TBL INNER JOIN CONTAINSTABLE(Incident, Subject, '"system" AND "needs" AND "to" AND "upgraded"') AS KEY_TBL ON FT_TBL.TicketNumber = KEY_TBL.[KEY])) </code></pre> <p>Once 'to' is omitted it works fine:</p> <pre><code>SELECT * FROM Incident WHERE (TicketNumber IN ( SELECT TicketNumber FROM [Action] FT_TBL INNER JOIN CONTAINSTABLE(Action, Text, '"system" AND "needs" AND "upgraded" AND NOT "Search Summary"') KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY] UNION SELECT TicketNumber FROM [Incident] FT_TBL INNER JOIN CONTAINSTABLE(Incident, Subject, '"system" AND "needs" AND "upgraded"') AS KEY_TBL ON FT_TBL.TicketNumber = KEY_TBL.[KEY])) </code></pre> <p>How can <code>CONTAINSTABLE</code> be used with these smaller words, or should they be left out altogether? If those smaller words are actually meaningful in the search, how can they be included in the search?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload