SQL Server Containstable issue

Hi experts,
I replaced my contains statements in our FT Search with containstable statements.
Containstable seems to run much faster in our case.
My problem is that searching for "word1" return a specific ID.
Searching for "word2" retuns the same ID.
Searching for "word1" and "word2" dont find that ID.

Due to our programm functionality this is very important for us.
Any ideas?

select * from containstable(tblName, (txt,syn),  '"DARM*"' ) as FT_TBL
order by  FT_TBL.[Key]
Key                                    Rank
8455683147005	10
select * from containstable(tblName, (txt,syn),  '"MG=10ST*"' ) as FT_TBL
order by  FT_TBL.[Key]
8455683147005	64
select * from containstable(tblName, (txt,syn),  '"DARM*" AND "MG=10ST*"' ) as FT_TBL
order by  FT_TBL.[Key]
No results!!!

Open in new window

Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I presume, like this:
select FT_1.[KEY] 
from containstable(tblName, (txt,syn),  '"DARM*"' ) as FT_1
join containstable(tblName, (txt,syn),  '"MG=10ST*"' ) as FT_2
  ON FT_1.[Key] = FT_2.[Key] 

Open in new window

Guy Hengel [angelIII / a3]Billing EngineerCommented:
could it be that 1 part (say DARM) is in txt field, and the other part "mg=10ST" in the syn field ?
that would explain the results...
duke63Author Commented:
hi angellll,

that is correct.
I didnt expect that behavior.
Any idea how to handle this with containstable?
duke63Author Commented:
thanks a lot angelIII !!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.