Full Text Search Help Required

  • Hi Below is my query which i'm using to full text search.

    declare @p_search_keyword varchar(100)='Iphone speakers'

    SET @p_search_keyword = '"'+@p_search_keyword+'"'

    SELECT mi.m_item_id , item_nm

    FROM dbo.tbl_item mi(nolock)

    WHERE

    CONTAINS( mi.item_nm,'FORMSOF(INFLECTIONAL', +@p_search_keyword+'")' )

    I dont know how to use it with FOrm Of its throwing syntax error can anyone help with the syntax

    Thanks

    Vineet BHargava

  • I am not sure you can do this without dynamic sql as CONTAINS predicate has single quote inside for this case:

    CONTAINS(Description, ' FORMSOF (INFLECTIONAL, str_to_search) ');

    With dynamic sql it works like a charm

Viewing 2 posts - 1 through 1 (of 1 total)

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