Try pick and match function like below,
CountyData: LOAD *, Pick(Match(County,'Utah','Virginia','XCV')+1,County,'UT','VA','XC') as CountyNew; LOAD * INLINE [ County Utah XCV sd Virginia ];
Let me know.
Jonathan.qvw 145.8 K
I agree with mahlerma - do not hard code a lookup like this. Use a mapping table that can be loaded from an inline load or (better) an external source like Excel or a database table. Then when new or changed mappings are needed, there is no need to dive into the code. Especially for a case like this when you might pick up new abbreviations from time to time.
As an example for inline (which is easily converted to an external source if required):
Mapping LOAD * Inline
Applymap('MapLookups', County, County) As County
This will return the original value if the value is not in the lookup table.