Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2008
    Posts
    120

    Unanswered: mixing INFLECTIONAL, with Wildcards

    Can you mix FORMSOF INFLECTIONAL with Wildcards???
    I've tried it but but get this error:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error near 'testers' in the full-text search condition 'FORMSOF(INFLECTIONAL, "testers*")'.

    Like:

    Code:
    Results_Comm__Parm1 = Results_Comm__Parm1 & "FORMSOF(INFLECTIONAL, " & chr(34) & chr(42) & sSearchArray(i)& chr(42) &  chr(34)&")"
    Is it possible to do this another way??

    Thank You
    Andy

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I don't think "chr" is a function in SQL Server.

    As far as I can tell from a quick glance at Books Online, you can have prefix terms (like 'testers*'), but I do not see anything about suffix terms. Have you looked into the FREETEXT functions? I am not sure what you are trying to accomplish with this, so it is hard to suggest a solution.

  3. #3
    Join Date
    Feb 2008
    Posts
    120
    Hi MCrowley
    Thanks for replying again :-)

    That particular code is in my ASP page.
    The actual variable value sent to MS SQL is:

    FORMSOF(INFLECTIONAL, "multimeters*")

    My problem is that using Formsof Inflectional doesn't seem to work with *
    I get the error mentioned :-(

    Thanks
    Andy

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    FORMSOF, does not appear to allow wildcards. I suspect because FORMSOF is a sort of wildcard in and of itself. What value are you trying to get into the resultset with the searchterm "multimeters*"?

  5. #5
    Join Date
    Feb 2008
    Posts
    120
    Yes that does look like the case.
    I need it mainly for the singular of products, so need to find multimeters and multimeter.
    This is the case for a lot of products i guess.

    Thanks again
    Andy

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    The inflectional search seems to not care if a word is singular or plural. The Thesaurus search definitely cares. The freetext function does not seem to mind singular vs plural, either. So this should work for you:
    Code:
    select *
    from tablename
    where contains (columnname, 'formsof (inflectional, "multimeter")')
    That should also return the same resultset as
    Code:
    select *
    from tablename
    where contains (columnname, 'formsof (inflectional, "multimeters")')
    since "multimeter" and "multimeters" are forms of each other. It may be that they get scored differently from one another in containstable. I have not tested that.

  7. #7
    Join Date
    Feb 2008
    Posts
    120
    Hi MCrowley
    I need to use CONTAINSTABLE and RANK Column for ordering.
    But in addition to the previous example, i need my recordset to be able to find products such as mft1720 where the search criteria is mft

    I'd of thought this kind of search would be quite common, but i've yet to find the answer.

    it seems i have the choice of using either FORMSOF INFLECTIONAL or Wildcards.

    Hmm
    Stuck
    Andy

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    How about:
    Code:
    select *
    from tablename
    where contains (columnname, 'formsof (inflectional, "multimeter") or "mft*"')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •