BookmarkSubscribeRSS Feed
WL2
Calcite | Level 5 WL2
Calcite | Level 5

I need to use SAS EG 8 to work on some tables. however in each variable name has ".",how to remove them?

 

For example ,  table name is T1, the variable name in T1 is like T1.V1, T1.V2 and so on..

 

thanks

3 REPLIES 3
Tom
Super User Tom
Super User

Really?  That looks like the way you would reference a variable named V1 from a table named T1 in SQL code.  Are you sure the actual variable have those named? Run PROC CONTENTS to confirm that those are the actual variable names.

 

If you do have variable names like that which do NOT follow normal naming conventions you will need to reference them using name literals.

rename "t1.v1"n=v1;

 

ballardw
Super User

Did you create the data sets?

Reeza
Super User

That sounds like an alias that's used in SQL. Can you provide more context on what is happening here and what you're trying to do. 

 

In SQL you will often alias a table as t1, and then t1.v1 is a variable, v1, from table t1 because different tables can have the same names. 

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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