I have a table where there is a column of type ‘text’. I know I can compare two entries to see is they are the same using a simple select statement. Is there a way to compare two entries and return how similar they are? More specifically, can it say how many characters are different between the two?
For example, suppose one entry is:
This is a line.
And another that is:
This is a line. And another.
I believe I can write a select statement that says the first in contained in the second. But is there a way to alert me that the first is in the second AND there are 15 extra characters in the 2nd?
Try to use Levinshtein distance http://www.artfulsoftware.com/infotree/queries.php#552