language-icon Old Web
English
Sign In

Safely Merging Many Datasets

2011 
When SAS® merges datasets that have variable names in common, only one instance of the variable name is preserved and the last occurrence of a shared variable name overwrites all previously encountered data. As a result, a SAS user working with unfamiliar datasets may unknowingly lose valuable data particularly if the merge involves a large number of datasets and/or variables. Expanding on previously published methods using PROC SQL and the DICTIONARY.COLUMNS table to dynamically rename common variables before merging two datasets, this paper will present methodology to safely merge all datasets in a library by dynamically renaming and relabeling any variables with the same name.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    1
    References
    0
    Citations
    NaN
    KQI
    []