Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    130

    Unanswered: How to do LIKE matching in a.Name=b.Name

    Hello ALL,


    I have a statement as follows
    Code:
    SELECT * FROM tb1, tb2 WHER tb1.Name = tb2.Name
    I would like to do fuzzy matching on the name field. I need something like
    Code:
    SELECT * FROM tb1, tb2 WHER tb1.Name LIKE '%tb2.Name%'
    Also, I tried with
    Code:
    SELECT * FROM tb1, tb2 WHER LOCATE(tb1.Name, tb2.Name)<>0

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Try:
    Code:
    LIKE Concat('%', tb2.Name, '%')
    George
    Home | Blog

Posting Permissions

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