Contains/Containstable and search in Like mode

Central data 156 Reputation points
2025-06-03T02:01:30.92+00:00

I have indexed the "Contenido" field in Full Text. Searching with CONTAINS/CONTAINSTABLE in Like mode yields no matches when using words that contain the text "ous" (house). If I remove the asterisks and I write 'house', the text is found.

USE [Esp Libros en Español]
GO
SELECT SQL_TABLE.*, FT.* FROM [Libro_Sanchez Aguilar, Agustin - Don Quijote] AS SQL_TABLE 
INNER JOIN CONTAINSTABLE([Libro_Sanchez Aguilar, Agustin - Don Quijote], 
[Contenido], '*ous*') AS FT ON FT.[KEY] = SQL_TABLE.Id 
WHERE (ESTADO IS NULL OR ESTADO = ' ')  AND  [Pagina] = 92 
ORDER BY RANK, Pagina, Parrafo, Linea, Palabra

-----------------

SELECT SQL_TABLE.* FROM [Libro_Sanchez Aguilar, Agustin - Don Quijote] AS SQL_TABLE 
WHERE (ESTADO IS NULL OR ESTADO = ' ')  AND  
CONTAINS ([Contenido], '*ous*')  AND  [Pagina] = 92 ORDER BY Pagina, Parrafo, Linea, Palabra
SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
198 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,416 Reputation points
    2025-06-03T05:55:55.5466667+00:00

    [Contenido], 'ous')

    MS Transact-SQL CONTAINS does not support an include" search, only Prefix searches, see

    https://learn.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql?view=sql-server-ver17

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.