Add new column to SAS table

Reply
Occasional Contributor
Posts: 9

Add new column to SAS table

Hi,

I am very new to SAS. I am trying to add a new column to the SAS table but to no avail!!

I get the error "The Delete permission is required to delete tables or views in the SAS library."

Below is the code I'm using, could someone advise if this is the correct way to go about this? Or how can i trouble shoot the error above.

PROC SQL;

ALTER TABLE DEV_MART.CHURN_MART_WITH_CONTROL_GROUPS ADD AVONDHU_GROUP CHAR FORMAT $24.;

Thanks

Super User
Super User
Posts: 7,997

Re: Add new column to SAS table

It looks to me like you don't have read/write access to that table/area.

Occasional Contributor
Posts: 9

Re: Add new column to SAS table

If i check in Management Console, i am a member of the a user group which has full permissions on this dataset.

Super User
Super User
Posts: 7,997

Re: Add new column to SAS table

Ah, so you are using Metadata server or something.  Sorry, its not clear from your post.  I don't use this so can't help there.  Maybe post in the the softwares specific sub-forum.

Super User
Posts: 19,877

Re: Add new column to SAS table

Are your data sas datasets or on a server i.e. SQL Server?

Can you do it via a data step?

data DEV_MART.CHURN_MART_WITH_CONTROL_GROUPS;

set DEV_MART.CHURN_MART_WITH_CONTROL_GROUPS;

length AVONDHU_GROUP $24.;

AVONDHU_GROUP='';

run;

Occasional Contributor
Posts: 9

Re: Add new column to SAS table

Hi Reeza,

Thanks for this. I changed a permission and ran the data step and it's working for me now.

Super User
Posts: 10,046

Re: Add new column to SAS table


data class;
 set sashelp.class;
run;

proc sql;
 alter table class 
  add x char(20);
quit;

Xia Keshan

Ask a Question
Discussion stats
  • 6 replies
  • 480 views
  • 3 likes
  • 4 in conversation