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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 928 views
  • 0 likes
  • 4 in conversation