LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 10 Sep 2004 15:15:44 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: Compare Similarity

Read up on the SCAN function. You can get 1st, 2nd, ... or nth word.

On Fri, 10 Sep 2004 12:13:55 -0400, Thomas <tythong@YAHOO.COM> wrote:

>Hi all, > >I encountered a problem of comparing/matching the two dataset with highly >similar two items. Using the "scan" in proc sql, it only compares the >first word before the next blank between the two items. However, how to >make it more generic so that we can compare the words upto 2 before the >next blank. > >Thank you very much! >Thomas > > >proc sql; > create table staff_fin as > select * from staff_cost2 natural join financial > where scan(CoName2,1,' ')=scan(CoName,1,' ') and fyr=fyr2; >quit; > > >The scan part only compare the first non-blank words between CoName2 AND >CoName. Is it possible to compare upto 2 or even more accurate words >between CoName and CoName2? The CoName or CoName2 may have one or more >words.


Back to: Top of message | Previous page | Main SAS-L page