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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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