Results 1 to 2 of 2

Thread: Sql Query statement...

  1. #1
    Join Date
    Oct 2002
    Posts
    3

    Question Sql Query statement...

    I have a simple question that bugged me for a while. I need to query an MS Access database that has two fields. Each field contains a bunch of words, I
    would want to query by fields using one or more keywords entered by the
    user. So, for example, if the user enters "Query fields containing these
    phrases", the perl script should bring up the fields from the database
    that match these phrases or keywords. Here comes the big question...

    How should this sql statement look? Please advise. I thank you very much.
    note: sorry, this is an exact post in the database journal.

  2. #2
    Join Date
    Nov 2002
    Location
    Berlin, Germany
    Posts
    3
    what do you think about the following query?

    SELECT * FROM [table_name] WHERE [column] LIKE replace("is it in here", " ", "%")

    Now you got full-text-search on column [column] in table [table_name] for the words "is", "it", "in" and "here".
    But the order of the words which the user enters is important. Fields like "it is in here" will not be found by this sql-statement, but Values like "isitinhere", "IS IT IN HERE" or "issittinnheree".

    Maybe this is the solution you searched for, but without closer information...

Posting Permissions

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