Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    Unanswered: Searchng a Text Field with Wildcards


    Can anyone see what im doing wrong here..

    SELECT *
    FROM OutOfPrintItemsTable
    WHERE OutOfPrintItemsTable.Title Like "*" & S12006ReferencesTable.Reference & "*";

    Im trying to search all the Title Fields Text Fields in the OutOfPrintItemsTable where there is a partial match in the S12006ReferencesTable Reference Text Field.

    So if the Out of print title field was for example "Happy Days"

    Then when performing the Search in the S12006ReferencesTable there would be a match if the References field was "sdfSome Bolix Happy Days some ore bloixdlf"

    I think the logic is right i just cant get the syntax right, or perhaps its all wrong

    Any help would be most valuable.
    Kind Regards,
    John Eliot

  2. #2
    Join Date
    Nov 2002
    You've got the Like operation backwards. In your explanation, the title must be part of the reference, and in your SQL, the reference must be part of the title:

    Where 'Happy Days' Like '*sdfSome Bolix Happy Days some ore bloixdlf*'

    will not return the record.

    The other way round,

    Where 'sdfSome Bolix Happy Days some ore bloixdlf' Like '*Happy Days*'


Posting Permissions

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