Fulltext Search syntax error

  • Hi,

    we have enabled the fulltext search it working fine in sql server 2008 r2 enterprise editions

    Evrything is working except the below query please help us to pick up the data

    SELECT * FROM TABLE1 A WITH (NOLOCK) inner join TABLE B WITH (NOLOCK) on A.DocID = B.docid where CONTAINS (A.DATA, 'NEAR((WASHINGTON,DEVELOPMENT),10)')

    OUTPUT IS but thesql intelisense did not show any syntax error as per the

    Microsoft Sysntax i have wriiten query. is any problem in SQL?

    Msg 7630, Level 15, State 2, Line 1

    Syntax error near '(' in the full-text search condition 'NEAR ((WASHINGTON, DEVELOPMENT),10)'.

  • You need to use double quotes:

    SELECT * FROM v_contactsearch where CONTAINS (searchtext, '"NEAR((WASHINGTON,DEVELOPMENT),10)"')

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Thanks Eugene Elutin,

    But its not working. Return 0 result.

  • The above concepts and keywords available in sql server?

    I mean

    the below query

    SELECT * FROM TABLE1 A WITH (NOLOCK) inner join TABLE B WITH (NOLOCK) on A.DocID = B.docid where CONTAINS (A.DATA, 'NEAR((WASHINGTON,DEVELOPMENT),10)')

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply