DATA Step, Macro, Functions and more

Swap a " with a ' within a character field

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 128
Accepted Solution

Swap a " with a ' within a character field

Hi,

 

I couldnt' even find the right words to google this, so i'm here.  I have a character field that has " (double quote) mixed in it and i need to make them a ' (single quote) instead, while keeping everything else the same.

 

For example:

Have: Today is "awesome".

Want: Today is 'awesome'.

 

And of course, they're all in different places, and some obs don't even have them, only some of them do.

 

Is there a function for this?

 

Thanks

Megan


Accepted Solutions
Solution
‎03-21-2017 10:41 AM
Super User
Posts: 19,870

Re: Swap a " with a ' within a character field


All Replies
Solution
‎03-21-2017 10:41 AM
Super User
Posts: 19,870

Re: Swap a " with a ' within a character field

TRANSLATE()

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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