BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8

There are four columns for address which contain street address, city and country.

The issue is they are not structured, i.e addr2 colunmn may contain city name for some records and addr3 may contain city name.

Now I would like to contacatenate all address fields to one string and get the city and country names from it.

How do we achieve that?Is there any SAS Uitlity that has list of all cities and countries in the world?

1 REPLY 1
art297
Opal | Level 21

There isn't such a utility that I'm aware of.  However, if you post a subset of your file, someone might be able to suggest an alternative way of doing what you want.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1182 views
  • 0 likes
  • 2 in conversation