I need to get the common string between 2 fields:
Could I do it in sql (postrgre) ?
PS :It's an hypothetical pourcentage that's gives me the similarity of fields s2 and s2
Thank you in advance,
I need to get the common string between 2 fields:
Could I do it in sql (postrgre) ?
PS :It's an hypothetical pourcentage that's gives me the similarity of fields s2 and s2
Thank you in advance,
select * from table where field ilike $1;
More information on ilike however be warned that without an index or some sort of way to make the search faster, this is going to be a SLOW crawl over the table and it's values.
There are more advanced matching you can do. It would still be recommended to filter down your results set and then do the match against it somehow.
You would probably do that by matching on something smaller to compare to and then doing the matching for the string, but these links should be exactly what you're looking for.