SQL Server fulltext index doesn't return all data
In my table, I have a column that is publicationDate
, publication date set as NVarChar
that data model stored in column like these:
2008
2008-05
2008-10-23开发者_Go百科
I've created a fulltext index on this table when I get a query from SQL with this:
SELECT * FROM BOOKS_DETAILS WHERE CONTAINS(PublicationDate, N'2008')
It's just returned :
2008
2008-05
but doesn't return 2008-10-23
So how can I get all data that contains 2008
?
How about just simply:
SELECT (list of columns)
FROM dbo.BOOKS_DETAILS
WHERE PublicationDate LIKE N'2008%'
Really no need for a fulltext index....
If you search on this column PublicationDate
rather frequently, then an index on that column would be something to look at and it might help speed up those queries.
精彩评论