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

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
Lapis Lazuli | Level 10

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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