DATA Step, Macro, Functions and more

how to remove hidden quotes from data

Reply
Regular Contributor
Posts: 208

how to remove hidden quotes from data

In my data for a variable if i see it looks fine like

ex - stratos

if i copy it and check in notepad it becomes  "startos" masked with quotes this is becoming problem if i merge data on

 

How to remove these hidden quotes ?

 

Super User
Posts: 9,866

Re: how to remove hidden quotes from data

Please use the macro from my second footnote to convert the relevant portion of your dataset to a data step and post the resulting code here as advised in my third footnote. Only with having a clear picture of your data will we be able to provide help.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Super User
Posts: 9,384

Re: how to remove hidden quotes from data

Use compress().  Also, a quick search on here will reveal several topics with answers already:

https://communities.sas.com/t5/SAS-Procedures/SAS8-How-to-remove-special-characters-from-string/td-p...

 

Super User
Posts: 13,283

Re: how to remove hidden quotes from data

And how to you "copy it and check in notepad"? Export the data to a text file? Copy from Viewtable view?

Ask a Question
Discussion stats
  • 3 replies
  • 93 views
  • 0 likes
  • 4 in conversation