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