BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sir_Highbury
Quartz | Level 8

Dear experts,

I was searching a variable starting with "_", eg _xxxx in one excel table.

Now I am performing a join and I am looking the same variable specyfind the table, e.g. t1._xxxx

but I got the following message: column _xxxx could not be found.

Any idea to solve it? Thanks a lot.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Run Proc Contents on BOTH tables to get descriptions of the data. Find the correct name and use that OR rename the variable to match (recommended) in both tables.

 

Since it appears that your data originated in Excel the issue likely starts with the data and how it was brought into SAS. If one person created a sheet and had a space or other non-digit non-letter character at the start of a column name and someone else didn't in another sheet then the variables could very well end up with different SAS variable names. If one differs then you might find that others do as well and possibly the type, numeric/character changes.

View solution in original post

1 REPLY 1
ballardw
Super User

Run Proc Contents on BOTH tables to get descriptions of the data. Find the correct name and use that OR rename the variable to match (recommended) in both tables.

 

Since it appears that your data originated in Excel the issue likely starts with the data and how it was brought into SAS. If one person created a sheet and had a space or other non-digit non-letter character at the start of a column name and someone else didn't in another sheet then the variables could very well end up with different SAS variable names. If one differs then you might find that others do as well and possibly the type, numeric/character changes.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 659 views
  • 2 likes
  • 2 in conversation