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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1241 views
  • 0 likes
  • 2 in conversation