jeudi 6 mars 2014

compare differencesin a row between two identical tables in mysql


Vote count:

0




I have 2 identical tables with different set of data's, now I would like to compare the words in a single field against multiple rows of the same column in table b and let me know the percentage of matches against each id


Example:


The following are the entries in Table A



Row1: 1, salt water masala
Row2: 2, water onion maggi milk


The following are the entries in Table B



Row1: 1, salt masala water
Row2: 2, water onion maggi


The desired result



Row1: Match 100% (All the 3 words are available but different order)
Row2: Match 75% as 1 word does not match out of the 4 words.


It would be really great if someone could help me with the same.





asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire