Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. unable to use function MATCH in the requested context SQLite?
Forum Updated to NodeBB v4.3 + New Features

unable to use function MATCH in the requested context SQLite?

Scheduled Pinned Locked Moved Solved 3rd Party Software
3 Posts 2 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello,

    Using local database on my project, I need to make search on it but with my table named "remainPartList_log" and column named "part" and the value inserted in it "PartTest1" when I using the query:

    SELECT * FROM remainPartList_log WHERE part match 'PartTest1'

    I receive the error:
    unable to use function MATCH in the requested context: SELECT * FROM remainPartList_log WHERE part MATCH 'PartTest1'

    but the query:

    SELECT * FROM remainPartList_log WHERE part ='PartTest1' is working fine and return the correct row...

    Could you help me please?

    Kind regards

    Philippe

    JonBJ 1 Reply Last reply
    0
    • F filipdns

      Hello,

      Using local database on my project, I need to make search on it but with my table named "remainPartList_log" and column named "part" and the value inserted in it "PartTest1" when I using the query:

      SELECT * FROM remainPartList_log WHERE part match 'PartTest1'

      I receive the error:
      unable to use function MATCH in the requested context: SELECT * FROM remainPartList_log WHERE part MATCH 'PartTest1'

      but the query:

      SELECT * FROM remainPartList_log WHERE part ='PartTest1' is working fine and return the correct row...

      Could you help me please?

      Kind regards

      Philippe

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @filipdns
      Suggestion: https://stackoverflow.com/a/14074370/489865

      MATCH is only valid for virtual FTS tables. You need to use LIKE in regular tables.

      ? i.e. MATCH is only for searching in Full Text Search tables. If yours is just a regular table, you must use LIKE. MATCH is against an index of words which is only available for FTS tables.

      F 1 Reply Last reply
      3
      • JonBJ JonB

        @filipdns
        Suggestion: https://stackoverflow.com/a/14074370/489865

        MATCH is only valid for virtual FTS tables. You need to use LIKE in regular tables.

        ? i.e. MATCH is only for searching in Full Text Search tables. If yours is just a regular table, you must use LIKE. MATCH is against an index of words which is only available for FTS tables.

        F Offline
        F Offline
        filipdns
        wrote on last edited by
        #3

        @JonB Hello,

        Yes I just found what you say and solve with:

        SELECT * FROM remainPartList_log WHERE part LIKE '%art%'

        thank you very much

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved