<?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 proc sql drop variables from select in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-drop-variables-from-select/m-p/676229#M203876</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using proc sql below but was wondering if someone could tell me what the best way is to exclude some variables in the "B" dataset from being selected when the table is being created (as I only want the "DATE" and "PLACE" variables from dataset A to be shown in the created table)? As my "B" dataset has over 100 variables, I would like to keep 98 of them when I left join in onto the "A" dataset, but not select the "DATE" and "PLACE" variables (i.e. not select B.DATE and B.PLACE).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
     create table Final_Information as
     select A.*
           &lt;FONT color="#FF0000"&gt;,B.*&lt;/FONT&gt;   /*How to include all B dataset variables, except "B.DATE" and "B.PLACE"? */
      from AC.TEST as a
      left join INITIAL_DATA as b
            on a.RECORD_NUMBER=b.RECORD_NUMBER
      ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 16:33:31 GMT</pubDate>
    <dc:creator>Justin9</dc:creator>
    <dc:date>2020-08-12T16:33:31Z</dc:date>
    <item>
      <title>proc sql drop variables from select</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-drop-variables-from-select/m-p/676229#M203876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using proc sql below but was wondering if someone could tell me what the best way is to exclude some variables in the "B" dataset from being selected when the table is being created (as I only want the "DATE" and "PLACE" variables from dataset A to be shown in the created table)? As my "B" dataset has over 100 variables, I would like to keep 98 of them when I left join in onto the "A" dataset, but not select the "DATE" and "PLACE" variables (i.e. not select B.DATE and B.PLACE).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
     create table Final_Information as
     select A.*
           &lt;FONT color="#FF0000"&gt;,B.*&lt;/FONT&gt;   /*How to include all B dataset variables, except "B.DATE" and "B.PLACE"? */
      from AC.TEST as a
      left join INITIAL_DATA as b
            on a.RECORD_NUMBER=b.RECORD_NUMBER
      ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 16:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-drop-variables-from-select/m-p/676229#M203876</guid>
      <dc:creator>Justin9</dc:creator>
      <dc:date>2020-08-12T16:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql drop variables from select</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-drop-variables-from-select/m-p/676631#M204039</link>
      <description>&lt;P&gt;You can exclude those variables from the dataset in the from clause:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
     create table Final_Information as
     select A.*
           ,B.*   
      from AC.TEST as a
      left join INITIAL_DATA(drop=DATE PLACE) as b
            on a.RECORD_NUMBER=b.RECORD_NUMBER
      ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Aug 2020 03:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-drop-variables-from-select/m-p/676631#M204039</guid>
      <dc:creator>Angel_Larrion</dc:creator>
      <dc:date>2020-08-14T03:07:40Z</dc:date>
    </item>
  </channel>
</rss>

