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

Hi, I'm new to programming in SAS and it turns out that in a table I have two equal lines (as shown in the image), the problem is that one of those lines (the first), has a column (AN3) that contains a value with a line break, that is, the first record in AN3 has the value 20181 with the line break, and the second simply has 20181, without spaces or line breaks.

 

How can I delete only one of these lines? the one from 20181 with line break.

 

If I do a "delete * from table where AN3 = '20181'" I'm afraid it will delete the line, which is fine, but I don't know how to define the line break between the quotes.

 

Does anyone know how I could do this? thank you very much in advance, greetings

 

 

 

Abelp9_0-1659613909620.png

 

In excel the line break is not seen well but in SAP it is:

 

 

This is the line I want to delete:

ej1.png

And this is what the other line looks like:

ej2.png

 

 

Thank you very much in advance, greetings

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
Ksharp
Super User
Try this:

delete from table where findc(AN3, '0D0A'x) ;
Abelp9
Quartz | Level 8
It works, thank you very much
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 786 views
  • 1 like
  • 2 in conversation