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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 384 views
  • 0 likes
  • 3 in conversation