<?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: select a number field where clause in  proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634570#M188347</link>
    <description>&lt;P&gt;Or, if studentId is a character field, try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc SQL;
Select *
from TBL_Student
where input(StudentID, best.) = 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Mar 2020 20:48:29 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-03-24T20:48:29Z</dc:date>
    <item>
      <title>select a number field where clause in  proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634548#M188339</link>
      <description>&lt;P&gt;Hi I have simple query in Proc SQL to look for all ID = 0, but my result included both 1 and 0.&amp;nbsp; The table is in a SQL Server. My query is below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Select StudentID&lt;/P&gt;&lt;P&gt;from TBL_Student&lt;/P&gt;&lt;P&gt;where StudentID = 0;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had tried to the different in where clause but did not work :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where put(studentid, $1.) = '0'&lt;/P&gt;&lt;P&gt;where&amp;nbsp; put(studentid, best.) = 0&lt;/P&gt;&lt;P&gt;where studentid = put(0, $1.)&lt;/P&gt;&lt;P&gt;where studentid = put(0, 1.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 19:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634548#M188339</guid>
      <dc:creator>nshTi62</dc:creator>
      <dc:date>2020-03-24T19:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: select a number field where clause in  proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634553#M188343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285090"&gt;@nshTi62&lt;/a&gt;&amp;nbsp; Assuming I understand your requirement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Proc SQL;

  Select *  /*all columns*/

from TBL_Student
group by StudentID
having count(distinct StudentID) = 1 and studentid=0;

quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Or if it's not, post a sample of what you HAVE and what you WANT&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634553#M188343</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-24T20:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: select a number field where clause in  proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634570#M188347</link>
      <description>&lt;P&gt;Or, if studentId is a character field, try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc SQL;
Select *
from TBL_Student
where input(StudentID, best.) = 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634570#M188347</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-03-24T20:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: select a number field where clause in  proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634649#M188378</link>
      <description>&lt;P&gt;Whenever something does not meet your expectations, post the log. Copy/paste the log into a window opened with the &amp;lt;/&amp;gt; button.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 08:30:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-number-field-where-clause-in-proc-sql/m-p/634649#M188378</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-25T08:30:12Z</dc:date>
    </item>
  </channel>
</rss>

