Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename not working

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
0
0
US
proc sql;
create table Proj2 as
select Project, ProjectCode, Category, ProjectAmount
from Testdb.Project2;
run;

data Proj3(rename = (Project = Proj1));
set Proj2;
run;

When I run the second data set to change the name from Project to Proj1, the field name will not change. The code appears to be correct. Any ideas?
 
Your above code is slightly wrong, you have a run statement at the end of a proc sql statement.

Having said that...

Why not do it all in one step???

proc sql;
create table Proj2 as
select Project as Proj1,
ProjectCode,
Category,
ProjectAmount

from Testdb.Project2;
quit;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top