Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 CONTAINS and Weird Full Text Search Results

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-10 : 08:12:54
Dave writes "Hello,

I have enabled a table for full text indexing. Works well for the most part.

The problem is that when I query the table with the CONTAINS predicate and a value that is numeric (passed as text), I get no results where there should be.

For example:
There are two part numbers in the database:
12H 2-1/2
12H 2-1/4
If I pass '12H' in a variable to CONTAINS in the WHERE clause I get no results. If I pass '12' I get all part numbers with 1 and/or 2 but not the ones that begin with '12'. If I pass '12H 2' I get the parts that begin with 12H.
Two other part numbers:
MB 3-1/4
MB 2-7/16
work fine when I pass in 'MB'.
Here is the WHERE:

"WHERE CONTAINS(part_no,' " & chr(34) & strPrtNo & chr(34) &
" OR " & chr(34) & strPrtNo & "*" & chr(34) & " ') "

I have minimized the noise list to one insignificant value.

Thanks for any help in advance.

Dave"
   

- Advertisement -