Using FormsOf(INFLECTIONAL, )

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Casey
    New Member
    • Aug 2006
    • 8

    Using FormsOf(INFLECTIONAL, )

    This does not seem to work:

    CREATE Procedure getSearchResult s2
    (
    @search nvarchar(4000)
    )
    as
    SELECT listing_id, RANK, name, address, city, zip, heading, phone
    FROM listings a,
    FREETEXTTABLE(l istings, *, 'FormsOf(INFLEC TIONAL, @search') b
    WHERE [KEY] = a.listing_id
    ORDER BY RANK DESC, name

    GO

    It always treats @search as NULL. What's wrong with my syntax here?

    Thanks!

    Casey
  • Casey
    New Member
    • Aug 2006
    • 8

    #2
    I should be more clear:

    DECLARE @SearchWord nvarchar(4000)
    SET @SearchWord = 'tax'
    SELECT listing_id, RANK, name, address, city, zip, heading, phone
    FROM listings a,
    FREETEXTTABLE(l istings, *, 'FormsOf(INFLEC TIONAL, @SearchWord')
    WHERE [KEY] = a.listing_id
    ORDER BY RANK DESC, name

    This returns no results. But this...


    SELECT listing_id, RANK, name, address, city, zip, heading, phone
    FROM listings a,
    FREETEXTTABLE(l istings, *, 'FormsOf(INFLEC TIONAL, tax')
    WHERE [KEY] = a.listing_id
    ORDER BY RANK DESC, name

    returns over 500 results

    ????????

    Comment

    • Casey
      New Member
      • Aug 2006
      • 8

      #3
      Please! Can nobody help? I am really stuck here!

      Casey

      Comment

      • iam_clint
        Recognized Expert Top Contributor
        • Jul 2006
        • 1207

        #4
        you have two opening ( but one closing, not sure if that makes a difference in my scripting languages it would

        FREETEXTTABLE(l istings, *, 'FormsOf(INFLEC TIONAL, tax'))

        also your variable up there has quotation around it you might try removing the quotation

        Comment

        Working...