views:

117

answers:

1

What would be the search condition for the query below if we wanted to retrieve all the keys for which the columnName does not contain "thisWord" ?

SELECT [key] AS someValue 
     FROM CONTAINSTABLE ( table ,columnName, ??what goes here?? )

Note: This is a full-text based search.

+3  A: 

I think:

SELECT 
   [key] 
FROM tableName 
   LEFT JOIN CONTAINSTABLE ( tableName ,columnName, '' ) AS ct ON tableName.[key] = ct.[key]
WHERE tc.[key] IS NULL
Allain Lalonde