如何修改此查询以搜索仅相隔两个单词的关键字?
select id, SubjectText from dbo.email where contains
([ContentText],'execute NEAR class near program near code near SQL');
去
这些是我得到的结果:
id SubjectText
1 examples for you
3 Oracle classes starting soon
4 Toms Hardware nes letter
5 Registration starts soon
7 Dreamspark SQL order ready
8 SQL classes free online
10 Visual Basic key
20 SQL Help
21 A Free SQL Server Monitoring Package
22 A Monitoring Package
试过: -
select id, SubjectText
from dbo.email
where contains (ContentText,
'NEAR ((execute, class , program, SQL ,code),2,true)'
);
但得到错误Msg 7630, Level 15, State 2, Line 2 Syntax error near '(' in the full-text search condition 'NEAR ((execute, class , program, SQL ,code),2,true)';
我努力了
select id, SubjectText from dbo.email where contains ([ContentText],'"( (execute near class, near program ,NEAR code,near SQL ))"',2,true); 去
和
select id, SubjectText from dbo.email where contains ([ContentText],'near( (execute , class, program code, SQL ))',2,true); 去
和
select id, SubjectText from dbo.email where contains ([ContentText],' (execute near class near program NEAR code near SQL)',2,true); 去
他们都没有工作他们都产生错误请帮助