BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
YannRC
Obsidian | Level 7

YannRC_0-1765823264612.png

 

Hi, I try to clean a dataset of adress. There are not good. I know that the best practice is to geolocalise every adress but i have to clean quickly. The first thing I want to to is to change AV by AVENUE, BLD by BOULEVARD,etc... I know that I can use TRANWRD but i can change only one WORD. So, my idea was to use multiple CASE WHEN.... in a query. But i have this error. And I don't really understand Why. Can you help me? I use SAS STUDIO

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Your table does not have the variable AV that you referenced in the expression using the CONTAINS keyword/function.  I suspect you meant to use the string 'AV' instead.  

 

You should use the FINDW() function instead of using CONTAINS to avoid changing part of name that just happens to have AV in it.  For example "BRAVO STREET".

 

Or perhaps look at using regular expressions.

 

PS: Please post text, such as code or LOG lines, as text and not pictures.  You can use the Insert Code button to get a pop-up window where you can paste or edit the text.

View solution in original post

1 REPLY 1
Tom
Super User Tom
Super User

Your table does not have the variable AV that you referenced in the expression using the CONTAINS keyword/function.  I suspect you meant to use the string 'AV' instead.  

 

You should use the FINDW() function instead of using CONTAINS to avoid changing part of name that just happens to have AV in it.  For example "BRAVO STREET".

 

Or perhaps look at using regular expressions.

 

PS: Please post text, such as code or LOG lines, as text and not pictures.  You can use the Insert Code button to get a pop-up window where you can paste or edit the text.

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 save with the early bird rate—just $795!

Register now

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