proc sql;
delete from sashelp.class
where age>13;
quit;
Hi, I used the above mentioned SAS code to delete the observations from sashelp.class dataset whose age is greater than 13.
By doing so, 9 records got deleted. Now when I use Proc Print statement to display the same dataset, I only get 10 records instead of 19 which is obvious. How can I get back all the 9 deleted observations? I tried using Global statements but it didn't work out.
Now I can not perform any manipulations or analysis on a dataset that has incomplete observations.
Please help me solving this issue.
Thank you
Avijeet
I highly suspect that's an illegal version. Especially if you just installed it.
Search SAS Analytics U and you can download and work with the latest version. It's free for learning.
1. I'm surprised you were able to delete those rows, usually SASHELP is locked down.
2. You cannot replace the rows once their deleted unless you have some options set up on your server. You'll need to get the original dat a back somehow. Maybe a colleague will have it on their system? Its not just the data, its the labels and formats as well, so I recommend getting the SAS dataset from someone with a similar set up to yours.
Hi,
FYI I am a student. I am learning SAS now and I don't use the licensed software.
I am using the university edition. What should I do to get back the deleted records?
SAS UE doesn't allow you to do that.
What exactly do you mean by University Edition? If it's the one downloaded from SAS UE, the quickest way is to redownload the image and re-install.
@Avijeet wrote:
Hi,
FYI I am a student. I am learning SAS now and I don't use the licensed software.
I am using the university edition. What should I do to get back the deleted records?
Just to confirm my software information is
SAS 9.1.3 Service Pack 4
XP_PRO platform and not the SAS UE edition.
I got it installed from the institute where I am undergoing training on SAS.
Thank you
I highly suspect that's an illegal version. Especially if you just installed it.
Search SAS Analytics U and you can download and work with the latest version. It's free for learning.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.