<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6) in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411472#M12576</link>
    <description>&lt;P&gt;Hi Mario.&amp;nbsp; There’s no ‘automatic’ option to rename 100+ columns to make the variable names mutually exclusive for the two datasets you want to merge (apart from your merge by variables) and I guess your question stems from not wanting to manually code data step option (rename = (old-name-1 = new-name-1 … old-name-100+ = new-name-100+))?!&amp;nbsp; There’s an interesting thread on the topic: &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Enhanced-RENAME-syntax-to-handle-variable-lists/idi-p/401758" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/Enhanced-RENAME-syntax-to-handle-variable-lists/idi-p/401758&lt;/A&gt; A PROC SQL join might be easier to code SELECT TableA.*, TableB.Var1 AS B_Var1… (if you have a listing of the columns in CSV/Excel you can =Concatenate(“,TableB.”,A#,” AS B_”,A#) where column A contains your original variable names).&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 10:45:17 GMT</pubDate>
    <dc:creator>Jeremy_Browne</dc:creator>
    <dc:date>2017-11-08T10:45:17Z</dc:date>
    <item>
      <title>Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411436#M12575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS 4.6 client and have 2 SAS tables &amp;nbsp;joined and need to map all&amp;nbsp;columns from both of them to target table.&amp;nbsp;&lt;BR /&gt;The problem is: most of the&amp;nbsp;columnn names are the same for two source tables.&lt;BR /&gt;&lt;BR /&gt;I can't add columns from 2nd table after I added all from the first one (only few which differ are added).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to add them and for SAS to rename target column names automatically?&lt;BR /&gt;Tables have 100+ columns each.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 13:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411436#M12575</guid>
      <dc:creator>strsljen</dc:creator>
      <dc:date>2017-11-08T13:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411472#M12576</link>
      <description>&lt;P&gt;Hi Mario.&amp;nbsp; There’s no ‘automatic’ option to rename 100+ columns to make the variable names mutually exclusive for the two datasets you want to merge (apart from your merge by variables) and I guess your question stems from not wanting to manually code data step option (rename = (old-name-1 = new-name-1 … old-name-100+ = new-name-100+))?!&amp;nbsp; There’s an interesting thread on the topic: &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Enhanced-RENAME-syntax-to-handle-variable-lists/idi-p/401758" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/Enhanced-RENAME-syntax-to-handle-variable-lists/idi-p/401758&lt;/A&gt; A PROC SQL join might be easier to code SELECT TableA.*, TableB.Var1 AS B_Var1… (if you have a listing of the columns in CSV/Excel you can =Concatenate(“,TableB.”,A#,” AS B_”,A#) where column A contains your original variable names).&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 10:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411472#M12576</guid>
      <dc:creator>Jeremy_Browne</dc:creator>
      <dc:date>2017-11-08T10:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411514#M12577</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expected default behavior similar to SAS EG: SAS appends &lt;STRONG&gt;1&lt;/STRONG&gt; to the&amp;nbsp;end of the column name that already exist under that name.&lt;/P&gt;&lt;P&gt;Sorry to hear it has to be more/less manual job in DI.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 13:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411514#M12577</guid>
      <dc:creator>strsljen</dc:creator>
      <dc:date>2017-11-08T13:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411567#M12581</link>
      <description>&lt;P&gt;Can you APPEND the data instead, if most of the columns are the same, and then TRANSPOSE it instead of doing the 'manual' approach?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 16:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411567#M12581</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-08T16:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411585#M12582</link>
      <description>TRANSPOSE is the anti matter when it comes to ETL!&lt;BR /&gt;Knot knowing your design, but unless you are dealing with ABT's hundreds of columns indicates an inappropriate model.&lt;BR /&gt;Also, what kind of join do you have when you want like named columns duplicated?</description>
      <pubDate>Wed, 08 Nov 2017 16:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/411585#M12582</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-11-08T16:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping columns from multiple tables with same column names to target ( SAS DI 4.6)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/412824#M12614</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source data I have no influence on.&lt;BR /&gt;I did it manual way. Good thing is that this is not a daily basis use case, more as a exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your hints.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 09:54:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Mapping-columns-from-multiple-tables-with-same-column-names-to/m-p/412824#M12614</guid>
      <dc:creator>strsljen</dc:creator>
      <dc:date>2017-11-13T09:54:54Z</dc:date>
    </item>
  </channel>
</rss>

