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

 

 

 

 

Hi, 

Could anyone please help?

It is a simple code to delete rows from a sas table, however my objective with this is to decrease the size of table because I will use the size  later as a schedule on SAS Management.

However despite of this code delete  rows the size table keeps always  the same .

Many thanks in advance .

 
 
proc sql;
delete from  sasmf.TRIGGERPAYTEST;
  quit;
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
tomrvincent
Rhodochrosite | Level 12
your code will delete all records. Use compress to lower the size (not guaranteed).

View solution in original post

6 REPLIES 6
tomrvincent
Rhodochrosite | Level 12
your code will delete all records. Use compress to lower the size (not guaranteed).
jorquec
Quartz | Level 8
Compress?
How?
proc sql;
delete from sasmf.TRIGGERPAYTEST;
compress;
quit;
Tom
Super User Tom
Super User

All you did was mark the observations as deleted.

Why not just re-create the dataset?

jorquec
Quartz | Level 8

Sorry I can not re create the file because I lost the rights . My only option is change the size.

SASKiwi
PROC Star

Using this DATA step with the COMPRESS option will compress your dataset and remove all rows:

data sasmf.TRIGGERPAYTEST (compress = yes);
  sasmf.TRIGGERPAYTEST (obs= 0);
run;

BTW does sasmf mean this a mainframe SAS data library? What OS does SAS run on?

Ksharp
Super User
data sasmf.TRIGGERPAYTEST;
 set sasmf.TRIGGERPAYTEST;
 stop;
run;