<?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: [SQL] how to exclude a variable when doing 'select' in SQL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91063#M25987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would work better using a RENAME dataset option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;create table want(drop=x) as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; select a.*,b.*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; from data1 a &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , data2(rename=(id=x)) b&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; where a.id = b.x&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2012 02:11:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-10-11T02:11:38Z</dc:date>
    <item>
      <title>[SQL] how to exclude a variable when doing 'select' in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91060#M25984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we use (select data.*) to choose those variables we want, but how can we do a selection to choose all variables but to exclude just one variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This question came up when i tried to merge two datasets by "id", but I got a warning msg said the "id" had already existed.&lt;/P&gt;&lt;P&gt;Then I have to manually rewrite the 'select' statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion ? Thanks! se&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 14:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91060#M25984</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2012-10-10T14:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: [SQL] how to exclude a variable when doing 'select' in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91061#M25985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there might be an option to turn off that warning but I don't recall.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other method is to run it with the feedback option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql feedback;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from sashelp.class;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the list from the log and then delete the one(s) you don't want. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 15:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91061#M25985</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-10-10T15:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: [SQL] how to exclude a variable when doing 'select' in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91062#M25986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can rename it ,then drop it at the output datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want(drop=x) as&lt;/P&gt;&lt;P&gt; select a.* , b.b1,b.b2,...., &lt;STRONG&gt;b.id as x&lt;/STRONG&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 01:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91062#M25986</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-10-11T01:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: [SQL] how to exclude a variable when doing 'select' in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91063#M25987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would work better using a RENAME dataset option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;create table want(drop=x) as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; select a.*,b.*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; from data1 a &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , data2(rename=(id=x)) b&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; where a.id = b.x&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 02:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-how-to-exclude-a-variable-when-doing-select-in-SQL/m-p/91063#M25987</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-11T02:11:38Z</dc:date>
    </item>
  </channel>
</rss>

