Phonetic Matching (Sounds-Like Operator =*) in PROC SQL
From sasCommunity
--KirkLafler 17:55, 24 April 2007 (EDT)
By Kirk Paul Lafler, Software Intelligence Corporation
A technique for finding names that sound alike or have spelling variations is available in PROC SQL. Although not technically a function, the sounds-like operator “=*” searches and selects character data based on two expressions: the search value and the matched value. Anyone that has looked for a last name in a local telephone directory is quickly reminded of the possible phonetic variations. To illustrate how the sounds-like operator works, we will search on the movie title in the MOVIES table using the string “Rucky” for any and all phonetic variations related to the movie title “Rocky”.
PROC SQL Code
PROC SQL; SELECT title, rating, category FROM movies WHERE title =* “Rucky”; QUIT;
Results
Title Rating Category
Rocky PG Action Adventure
[edit] Contact Information
If you would like more information or have any questions about this tip, please contact: Kirk Paul Lafler, Software Intelligence Corporation at KirkLafler@cs.com. Kirk has been working with the SAS System since 1979 and is a SAS Certified Professional®. His company provides custom SAS programming, application design and development, consulting services, and hands-on SAS training to clients around the world. Kirk is the author of four books including PROC SQL: Beyond the Basics Using SAS by SAS Institute, and more than two hundred peer-reviewed articles and papers that have appeared in professional journals and SAS User Group proceedings. Kirk can be reached at:
Kirk Paul Lafler
Software Intelligence Corporation
World Headquarters
P.O. Box 1390
Spring Valley, California 91979-1390
E-mail: KirkLafler@cs.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
