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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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