Questions tagged [containstable]

A T-SQL operator for performing a full-text search.

It performs a SQL Server full-text search on full-text indexed columns containing character-based data types.

More information here.

67 questions
10
votes
2 answers

SQL Server, ISABOUT, weighted terms

I am trying to figure out exactly how weighted terms work in an ISABOUT query in SQL SERVER. Here is where I currently am: Each query returns the following rows: QUERY 1 (weight 1): Initial ranking SELECT * FROM CONTAINSTABLE(documentParts, title,…
7
votes
1 answer

Significant difference between contains and containstable?

I have a full-text index created upon a column of type varchar(max) with filestream enabled. The filestream contains data such as JPG's, TIF's, PDF's, and XML's (although this is mostly irrelevant to the question, I believe). I have two queries that…
Jagd
  • 7,169
  • 22
  • 74
  • 107
5
votes
3 answers

SQL Server - Free text search with empty keyword

Below is a simplified version of my sql query that uses CONTAINSTABLE for full text searching. DECLARE @pSearchFor AS NVARCHAR(100); SET @pSearchFor = 'SomeKeyword'; SELECT MS.[ModuleScreenID] AS ScreenID ,MS.[ModuleScreenCode] AS ScreenCode …
muruge
  • 4,083
  • 3
  • 38
  • 45
5
votes
1 answer

How CONTAINSTABLE works with many search words

For example I got a table Companies. There is a field FullName in it, on which I got full-text index. Then I join that table with CONTAINSTABLE with @search_word like "company*" AND "name*" AND "oil*" AND "propan*" AND "liquid*"... from 1 to 10…
gofr1
  • 15,741
  • 11
  • 42
  • 52
5
votes
1 answer

How to use a column name in CONTAINSTABLE for the search condition?

I'm surprised to find that neither CONTAINS or CONTAINSTABLE seems to support syntax like the following where you pass a column name in for the last Search Condition parameter. SELECT * FROM dbo.Articles AS a WHERE EXISTS ( SELECT * FROM…
4
votes
1 answer

Ignore Dash (-) from Full Text Search (FREETEXTTABLE) search column in SQL Server

I use CONTAINSTABLE for my searching algorithm. I want to search column value with ignoring dash in particular column value. for example, column contains '12345-67' then it should search with '1234567' as below query. SELECT * FROM table1 AS…
4
votes
2 answers

CONTAINSTABLE query not recognising small words

I'm using CONTAINSTABLE 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. Quick example. Column being searched contains the text.…
user48408
  • 3,234
  • 11
  • 39
  • 59
4
votes
1 answer

SQL Server ContainsTable not returning result with term "inn"

I have a table called hotel with the following information: Hotel_Id: 2950 Hotel_Name: Inn on the Park Hotel_Number: 01234567 Hotel_TypeId: 1 I need to be able to search for records where the name column contains certain terms. The search is:…
GPW
  • 129
  • 1
  • 8
4
votes
1 answer

Why is SQL Server full-text search not matching numbers?

I'm using SQL Server 2014 Express, and have a full-text index setup on a table. The full-text index only indexes a single column, in this example named foo. The table has 3 rows in it. The values in the 3 rows, for that full-text indexed column…
Ryan
  • 867
  • 9
  • 23
3
votes
1 answer

Is there an equivalent to OR clause in CONTAINSTABLE - FULL TEXT INDEX

I am trying to find a solution in order to improve the String searching process and I selected FULL-TEXT INDEX Strategy. However, after implementing it, I still can see there is a performance hit when it comes to search by using multiple strings…
Harsha W
  • 3,162
  • 5
  • 43
  • 77
3
votes
2 answers

Order by not-selected column

I'm trying to use the SQL operator CONTAINSTABLE to get a list of search results, like this: SELECT c.*, ccontains.[RANK] FROM Customers c INNER JOIN CONTAINSTABLE(Customers, LastName, @searchTerm) ccontains ON c.Id = ccontains.[KEY] And calling…
3
votes
1 answer

TSQL CONTAINSTABLE and wildcard

I'm running a TSQL query that uses a CONTAINSTABLE-statement like this one CONTAINSTABLE(, , '01100011') which gives me the correct results. However, If I use CONTAINSTABLE(
, , '0110001*') instead, I…
Dave
  • 81
  • 5
3
votes
1 answer

SQL Server FREETEXTTABLE not returning result

I have used SQL Server FREETEXTTABLE function to search in a table column based on the user entered words like a search engine and return best matching rows. Table column will contain many questions and user will type something in textbox (in any…
3
votes
0 answers

Sql Server Containstable for searching within keywords

Scenario I've stored some keywords about each product in a column with name Tags .When a user searches a word that exists in this column, a relevant product must be shown. The user may enter some general words in the search query(for example:…
3
votes
2 answers

SQL Server Full Text Index Contains search exact match containing "it"

I'm fairly new to Full Text Index in SQL server. It has been working really well for me however, recently someone did an exact match search for "IT Manager" and the "IT" part of the search seems to be ignored. e.g. SELECT * FROM…
Paul Johnson
  • 1,417
  • 1
  • 17
  • 26
1
2 3 4 5