Deleating enter space in sas

Reply
Frequent Contributor
Posts: 85

Deleating enter space in sas


I am connecting to oracle and fetching tables form oracle into sas

i am facing problem if oracle tabe contains enter space

while exporting table to text format i am getting same enter space

how can i delete or remove this enter space

Occasional Contributor
Posts: 9

Re: Deleating enter space in sas

Hi Santhosh,

I'm not sure how to accomplish this in oracle, but on the SAS side you can try the following:

compress(vars, "", 'KADP");

It will keep Alpha-numeric-, Punctuation-, and numerical values

or 

do i = 9 to 13;

   vars = tranwrd(vars, byte(i), "");

end;

The 9 - 13 is based on the ASCII Code table. Normally in the data I've see these are the usuall suspects that causes issues. But the list of unwanted ones, is normall from 0 to 31.

HTH

H


Contributor
Posts: 22

Re: Deleating enter space in sas

Have a look on that "HANDLING SPECIAL EMBEDDED CHARACTERS" http://studysas.blogspot.fr/2011/10/how-to-remove-carriage-return-and.html

Do not forgot the difference between Carriage return et New Line below the system and the way "to insert in the database" type of field inside database !

Ask a Question
Discussion stats
  • 2 replies
  • 244 views
  • 0 likes
  • 3 in conversation