Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write query to obtain not 100% match?

 
tangara goh
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • 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.


 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • 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: 126
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic