Thank you so much @FreelanceReinh for your thorough investigation and welcome! I had tried your code out, and I was getting the duplicate observation like you mentioned, which had me baffled. This made me believe the culprit was something to with incorrect variable lengths. I was reading my input from datasets, which I believe may have had those non-breakable spaces like you mentioned. I do not know what kind of encoding they have used, but the data was 'messy' to say the least. I identified the 'messiness' using the hexadecimal conversion idea like you described, and as you expected, there were many non '20' entries within the phrases to be matched. I have created a script using your code to convert those to wrong values to '20' - or essentially 'clean' the dataset. It took some time to clean the dataset, as there were a lot of different types of wrong codes in between. I also found out that there were unnecessary trailing and ending spaces. So, I used the TRIM() function. The proc sql code was re-written below: proc sql; create table test as select a.* from table_one as a, table_two as b where find(a.Sentence, TRIM(b.Text))>0; quit; This gave me all the right values with duplicated observations when applicable. I am "accepting" this solution as the right solution as this helped me identify, de-bug and fix the errors. Thank you so much once again for all of your help! Very happy to be apart of this high quality community of SAS users!
... View more