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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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