Subject | Re: SQL Puzzle: Two Way String Matching |
---|---|
Author | red_october2009 |
Post date | 2012-05-14T19:43:01Z |
Hi Norm,
Yes, the field(s) are not normalized. It is a result of some things not in my control, which cannot be changed. I suspected that a stored procedure would be part of the answer.
I was wondering if there was some function I did not know about like:
WORD_INTERSECT(field1, field2) RETURNS INTEGER;
0 = NO WORDS INTERSECT
1 = WORD INTERSECT
I think one would have to build a list of words out of each field, then do a compare. Does this give you any ideas that would be a good approach for me? Or... actual PSQL would be best.
I'll take a stab at it in the mean time.
Thanks for letting me pick your brain. Hi also to Ann H.
Yes, the field(s) are not normalized. It is a result of some things not in my control, which cannot be changed. I suspected that a stored procedure would be part of the answer.
I was wondering if there was some function I did not know about like:
WORD_INTERSECT(field1, field2) RETURNS INTEGER;
0 = NO WORDS INTERSECT
1 = WORD INTERSECT
I think one would have to build a list of words out of each field, then do a compare. Does this give you any ideas that would be a good approach for me? Or... actual PSQL would be best.
I'll take a stab at it in the mean time.
Thanks for letting me pick your brain. Hi also to Ann H.