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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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