Hi everyone,
I'm so close to finishing this!
My very last step is giving me this error:
Duplicate column names have been detected in the above query which requested that
CORRESPONDING column names be matched. This situation is ambiguous.
How the heck do I fix this? do I have to delete all duplicate column names somehow?
Is there a way to find all the duplicate column names in SAS?
Use aliases to make the column names distinct.
Hi PG,
Can you or someone else please elaborate on this answer?
Why do I need to make the column names distinct? By Column names are you rerferring to the Variable names (i.e., making the variable names distinct)?
So for example I have the following variabels from 2 separate datasets that I'm trying to merge into one:
Dataset 1
Variable A Variable B Variable C
Dataset 2
Variable A Variable B Variable C
I want to merge these two datasets and all 3 variables. So Variable A from dataset 1 and 2 are in one column in the final merged dataset.
This is why I don't understand why I need to make the column names distinct b/c I don't want them to be distinct. Unless I am misunderstanding the solution?
Can someone please explain to me in basic terms and with basic examples?
Thank you so much
When I am merging the 2 datasets I want all 3 variables to be merged together
I don't fully understand how you got the message "Duplicate column names have been detected in the above query which requested that
CORRESPONDING column names be matched." since I didn't see the query in question. But I figure that if you get the names to be distinct, you will understand what's going on.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.