BookmarkSubscribeRSS Feed
Selli5
Fluorite | Level 6

Hello,

 

I have identified an error in within an address field and want to remove it.

 

Within an address field 'address_1'  there is occassionally an error ' -- Please Select -- ' written within it.  Is there a way to remove this phase from the address field?

 

thanks

Sally

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Like this?


data HAVE;
  ADDRESS_1= ' foo  -- Please Select --  faa ';
  ADDRESS_1=tranwrd(ADDRESS_1,'-- Please Select --','');
  putlog ADDRESS_1=;
run;

ADDRESS_1=foo     faa

kiranv_
Rhodochrosite | Level 12

May be something like this

data abc;

input addr_ln_1 $50.;
datalines;
 -- Please Select --1121 berkeley street
 7755 cambridge ave
;
run;

data bde;
set abc;
addr_ln_1=tranwrd(addr_ln_1,'-- Please Select --','');
run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 773 views
  • 1 like
  • 3 in conversation