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

I have a dataset that appears to have two duplicate columns.  One is named _col15, the other is _col18, they both match other columns that I have pulled in from a larger dataset.  

 

I've never seen this before, and don't see anything in the code that would generate this.  Prior to this dataset there are several simple left joins, nothing else.  Any thoughts?

 

 

Edit:  apologies, I found in the original query that two columns were entered twice, the forum wouldn't let me delete the post.  

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

With none of code, data set description details or example data my best answer is: 42.

 

I suggest running Proc Contents (or equivalent request for variable names from ALL data sets from Dictionary.columns) for all of the data sets referenced.

 

I suspect you will find the name in one of those. Unless you are using some heavy macro code to select and name variables, in which case you need to check that code by running it with Options MPRINT turned on.

View solution in original post

2 REPLIES 2
ballardw
Super User

With none of code, data set description details or example data my best answer is: 42.

 

I suggest running Proc Contents (or equivalent request for variable names from ALL data sets from Dictionary.columns) for all of the data sets referenced.

 

I suspect you will find the name in one of those. Unless you are using some heavy macro code to select and name variables, in which case you need to check that code by running it with Options MPRINT turned on.

Shmuel
Garnet | Level 18

Do "duplicate" means that both columns have same value?

If columns have different names they have been probably in previous data sets.

What code generated your data set? is origin an excel table?

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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 555 views
  • 0 likes
  • 3 in conversation