06-23-2014 01:23 PM
I want to group some values into one value. For eg : I have data for college names and some names are written in short form and some in full forms. The task is to group them into one name. I am using TRANWRD function to do it. Is it possible to group multiple values into one using TRANWRD function? I know the two datasets can be merged for it.
06-23-2014 03:45 PM
Examples of what you have and what you want. Depending on the number of records you might be able to create a format but tranwrd isn't going to get you there without a many lines of code though it can regularize some things common contractions to a single standard.
06-24-2014 10:14 AM
You need multiple tranwrd() for that purpose . But you can combine them all into one function :
if prxmatch('/ArthurT|ArthurC|ArthurK/',name) then name='Arthur' ;
06-24-2014 04:03 PM
I think you are on the wrong track. Spelling variations will most likely expand over time, and you don't to update your program each time.
Use a look-up table with incorrect - correct (normalized) spelling pairs. Then use the look-up technique you feel most comfortable with (user defined formats, SQL join etc).