• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to write query to obtain not 100% match?

 
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear experts,

I manage to come up with the 'matching' codes.

However, it doesn't produce exactly what I want and I'm stuck so I hope someone can advise me the correct way to do the query. Thanks.

What I'm trying to achieve is:

Parents ID and contact together with the tutors name and contact and subjects taught will be displayed once a match is found.

However, I want not just perfect match. I want something like a 80% match also be displayed.

So I try to put in (Parents.strSubjectsP LIKE '%' = Member.strSubject)

So tutor that can teach the subjects that the parents want and able to teach other subjects be displayed as well, not just the 100% match.


 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the first thing you need to do is define what you mean by "80% match". There's no absolute definition of this - you need to decide what it means. Once you've done that, then you can work out how to write a query for it.
 
tangara goh
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically what I want is that if the tutor's subjects and the parent's subjects are matched, it will be displayed.

Now, it gives me 100% match only :

Math = Math.

But I want to include Math, Science = Math also be included.

Hence I use the parent.subject LIKE '%' = member.subject.

Could you tell me how to query something like that and it will auto run every time the program is run? Thanks.
 
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic