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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1848 views
  • 3 likes
  • 5 in conversation