我在尝试运行此全文搜索查询时遇到问题。我需要对两个表进行全文搜索。如果任何一个表中有任何条款,我需要从第一个表中返回记录。
select R.* from Request R
inner join Patients P on R.PatientID = P.PatientID
inner join containstable(Request,(*),@keywords)AS KEY_TBL
ON R.RequestID = KEY_TBL.[Key]
full outer join
(select R.* from Request R
inner join Patients P on R.PatientID = P.PatientID
inner join containstable(Patients,(*),@keywords) AS KEY_TBL2
ON P.PatientID = KEY_TBL2.[Key]) as b on R.RequestID = b.RequestID