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

Hello
Does proc dataset support column level drop/keep functionality in SAS Viya 3.5/4 or even in SAS 9.4M8

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

No!

 

Data set has to be read and re-written for drop of a column.

You can do:

  • proc sql; alter table work.abc_xyz drop var_name; quit;
  • drop= or keep= data set options in data step
  • create a view on top of existing table leaving out the columns you are not interested in.

Let me know if you are working on CAS tables. For CAS tables there's one more approach.

 

Koen

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

No.  It does not make any sense that it would.  If you drop a variable you have a whole new dataset. So just make the new dataset.

sbxkoenk
SAS Super FREQ

No!

 

Data set has to be read and re-written for drop of a column.

You can do:

  • proc sql; alter table work.abc_xyz drop var_name; quit;
  • drop= or keep= data set options in data step
  • create a view on top of existing table leaving out the columns you are not interested in.

Let me know if you are working on CAS tables. For CAS tables there's one more approach.

 

Koen

thesasuser
Pyrite | Level 9

Thanks @sbxkoenk 
I would appreciate if you can list the other approach for CAS tables.
Thanks once again.

sbxkoenk
SAS Super FREQ

@thesasuser wrote:

I would appreciate if you can list the other approach for CAS tables.
Thanks once again.


Koen

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!

Discussion stats
  • 4 replies
  • 1371 views
  • 1 like
  • 3 in conversation