Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
I have a table in it there is a field by name City which has some errors needs to be replaced , Below is the wildmatch iam tryong to use but i think iam wrong somewhere . I want the city name to be replaced as i have described and other than that it should display all the CITY name as it is , and iam trying to create a new field by name cit. Pleas elet me know where iam wrong , This is loading but npt giving any error .Through some light on this
City:
LOAD CITY,
if(WildMatch(CITY,'BETHLEHT*'),'BETHELEHM') ,
if(WildMatch(CITY,'ZION HI*'),'ZIONHILL') ,
if(WildMatch(CITY,'SCOTT TW*'),'SCOTT TOWNSHIP') ,
if(WildMatch(CITY,'SCHUYKL HAV*'),'SCHUYLKILL HAVEN') ,
// if(WildMatch(CITY,'S ABINGTN TWP*'),'S ABINGTON TWP'),
if(WildMatch(CITY,'NEWBUR*'),'NEWBURG'),
if(WildMatch(CITY,'NEW RING*'),'NEW RINGGOLD'),
if(WildMatch(CITY,'MT BETH*'),'MOUNT BETHEL'),
if(WildMatch(CITY,'LAURY*'),'LAURYS STATION'),
if(WildMatch(CITY,'JERY*'),'JERMYN'),
if(WildMatch(CITY,'HONEYBRO*'),'HONEY BROOK'),
if(WildMatch(CITY,'HAZLE TOWNS*'),'HAZLE TOWNSHIP'),
if(WildMatch(CITY,'EGG HBR*'),'EGG HARBOR TWP'),
if(WildMatch(CITY,'EAST STROUDSBUR*'),'EAST STROUDSBURG'),
if(WildMatch(CITY,'DOYLETOW*'),'DOYLESTOWN'),
if(WildMatch(CITY,'CHARLESTO*'),'CHARLES TOWN'),
if(WildMatch(CITY,'CATASAQ*'),'CATASAUQUA'),
if(WildMatch(CITY,'BREININGSVI*'),'BREINIGSVILLE'),
if(WildMatch(CITY,'BOYTON BE*'),'BOYNTON BEACH'),
if(WildMatch(CITY,'BOILING SPN*'),'BOILING SPRINGS'),
if(WildMatch(CITY,'SPRNG BRK*'),'SPRING BROOK TWP'),
if(WildMatch(CITY,'PHILA*'),'PHILADELPHIA'),
if(WildMatch(CITY,'S ABINGT*'),'S ABINGTON TWP'),
//if(WildMatch(CITY,'SCHUYKL HAV*'),'SCHUYLKILL HAVEN'),
if(WildMatch(CITY,'NEW PHIL*'),'NEW PHILADELPHIA'), CITY AS cit,
=Pick(1+WildMatch(CITY,'BETHLEHT*', 'ZION HI*', 'SCOTT TW*'), ...........................
'BETHELEHM',
'ZIONHILL',
'SCOTT TOWNSHIP', .................................)
if its works plz close this thread
Try,
Pick(Wildmatch(CITY, 'BETHLEHT*', 'ZION HI*', 'SCOTT TW*', 'SCHUYKL HAV*', 'NEWBUR*', 'NEW RING*', 'MT BETH*', 'LAURY*', 'JERY*', 'HONEYBRO*', 'HAZLE TOWNS*', 'EGG HBR*', 'EAST STROUDSBUR*', 'DOYLETOW*', 'CHARLESTO*', 'CATASAQ*', 'BREININGSVI*', 'BOYTON BE*', 'BOILING SPN*', 'SPRNG BRK*', 'PHILA*', 'S ABINGT*', 'NEW PHIL*') +1
,CITY, 'BETHELEHM, 'ZIONHILL, 'SCOTT TOWNSHIP, 'SCHUYLKILL HAVEN, 'NEWBURG, 'NEW RINGGOLD, 'MOUNT BETHEL, 'LAURYS STATION, 'JERMYN, 'HONEY BROOK, 'HAZLE TOWNSHIP, 'EGG HARBOR TWP, 'EAST STROUDSBURG, 'DOYLESTOWN, 'CHARLES TOWN, 'CATASAUQUA, 'BREINIGSVILLE, 'BOYNTON BEACH, 'BOILING SPRINGS, 'SPRING BROOK TWP, 'PHILADELPHIA, 'S ABINGTON TWP, 'NEW PHILADELPHIA') as CITTTT
I put the else part in wrong place in my last post. You can try applymap instead of this manual work. It can be easy to maintain the script.