BookmarkSubscribeRSS Feed
ren2010
Obsidian | Level 7
I was running a sql

input table EMP is like the following:
id name sal
1 ram 300

My sql:
proc sql;
create table aa as select id,name=name,sal from emp;
quit;

In output table
id _TEMA001 sal
1 1 300

the variable _TEMA001 is numeric and has value 1 ,any one has any idea why this unusual name is appearing and why it is numeric?

Please help.
3 REPLIES 3
andreas_lds
Jade | Level 19
Can you explain what you want to achieve by using "name=name"?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Share your entire SAS program code, in the context of the SAS execution log. A PROC CONTENTS output *AFTER* the PROC SQL would also be useful.

Scott Barry
SBBWorks, Inc.
Doc_Duke
Rhodochrosite | Level 12
Read the documentation for the SELECT statement. "name=name" is a logical expression and returns a 1 or 0. Since you didn't give it a name, SAS made up one for you.

If you were just trying to rename the variable "name", use the AS operator.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1135 views
  • 0 likes
  • 4 in conversation