Desktop productivity for business analysts and programmers

Undo the changes in table through proc sql

Reply
Contributor
Posts: 62

Undo the changes in table through proc sql

Hello All,

 

Its very Urgent. I need your valuable help.

I have a Data set. and  it consist of 3500 Rows, Wrongly I have updated some thing else.

 

I was updaing for 2-3 rows, but it got updated for all 3500 rows. and i don't have back up too.

 

Please help me to do undo changes if possible through.

 

I was doing updation, through proc sql;

update table_name;

 

 

Please help me , if it is possible to undo the changes in table.

 

 

Thanks ,

Ritesh

Esteemed Advisor
Esteemed Advisor
Posts: 7,257

Re: Undo the changes in table through proc sql

Well, SAS isn't a database so it doesn't have rollback functionality or audit trail.  I am not familiar with EG any more, does that have audit history in it, didn't last time I looked.  If its data on a server then the likelihood is that your IT group willl mirror the data each night - if you contact them and them to restore the file to the way it was the day or timepoint before you made a change then you should be able to get it back, can't think of a simpler way.  Take it as a tip for the future - never modify source data - extract source data to working data and manipulate that.  

Esteemed Advisor
Posts: 6,733

Re: Undo the changes in table through proc sql

Have the last backup restored. If you don't have a backup, you need to rerun the original creation path of the dataset.

ALWAYS have a backup of production data, and ALWAYS keep your programs (including previous versions) so you can recreate data if you have to step back.

 

If you don't have a backup, you just received one of the most important lessions in data processing.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 62

Re: Undo the changes in table through proc sql

Thanks @kurtbremser- I understood, next time i will always take a backup..
Ask a Question
Discussion stats
  • 3 replies
  • 263 views
  • 1 like
  • 3 in conversation