<?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: a question about proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97130#M20495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! PG yes i tried group by comment but the same thing here... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 17:07:43 GMT</pubDate>
    <dc:creator>maomaochong96888_hotmail_com</dc:creator>
    <dc:date>2013-06-06T17:07:43Z</dc:date>
    <item>
      <title>a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97117#M20482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi! &lt;/P&gt;&lt;P&gt;I already spent a lot of time on this question and search a lot but cannot find answer...&lt;/P&gt;&lt;P&gt;I have a example&lt;/P&gt;&lt;P&gt;data t;&lt;BR /&gt;input a $ x;&lt;BR /&gt;datalines;&lt;BR /&gt;a 1&lt;BR /&gt;b 2&lt;BR /&gt;c 3&lt;BR /&gt;d 4&lt;BR /&gt;e 5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table t1 as select count(distinct a) as count, "bigger than 5" as comment from t where x &amp;gt; 5;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;why in the output comment is missing and count is zero... and if i change the subset condition to x &amp;gt;= 5 then the comment is not missing(is bigger than 5) and count is 1...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to solve this problem?&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;jennifer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97117#M20482</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-05T19:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97118#M20483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;will return no records, therefore, count is zero,&lt;/P&gt;&lt;P&gt;and comment is not missing when the code above is run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97118#M20483</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2013-06-05T22:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97119#M20484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS version and platform?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works for me: SAS 9.3 M2 on Win7 64bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97119#M20484</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-05T22:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97120#M20485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you try :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table t1 as &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(distinct a) as count, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "bigger than 5" as comment &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from t &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where x &amp;gt; 5 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;group by comment;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select * from t1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 23:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97120#M20485</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-05T23:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97121#M20486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for all your reply&lt;/P&gt;&lt;P&gt;it is so wierd... it works in my home's computer(sas9.2 on xp) but it really doesn't work on my computer in company(sas9,1 on xp)... &lt;/P&gt;&lt;P&gt;really don't why... it almost makes me crazy...&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 00:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97121#M20486</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T00:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97122#M20487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure that you don't have a typo.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If you do not have the COUNT() aggregate function (or some other aggregate function) then you will get 0 records returned instead of one record with a 0 for the count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try these three queries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data t;&lt;/P&gt;&lt;P&gt;input a $ x @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;a 1 b 2 c 3 d 4 e 5&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table nocount as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select "no count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table count as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; count(*) as count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; "count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table wrongcount as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; count('1','2') as count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; "count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 01:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97122#M20487</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-06-06T01:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97123#M20488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it's not a reference, but MS-Access 2007 also produces an empty table when no observation matches the condition and you group by a constant. It does, however output a zero count when the GROUP BY clause is omitted. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 02:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97123#M20488</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-06T02:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97124#M20489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks TOM&lt;/P&gt;&lt;P&gt;I understand what you mean. &lt;/P&gt;&lt;P&gt;And I try your code in my company's computer.&lt;/P&gt;&lt;P&gt;for this part&lt;/P&gt;&lt;P&gt;create table count as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; count(*) as count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; "count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;I think the result should be&lt;/P&gt;&lt;P&gt;count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment&lt;/P&gt;&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count bigger than 5&lt;/P&gt;&lt;P&gt;right?&lt;/P&gt;&lt;P&gt;but in my company's computer, it is always as below,&lt;/P&gt;&lt;P&gt;count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment&lt;/P&gt;&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I just wonder why the comment is missing....&amp;nbsp; this is my problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 13:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97124#M20489</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T13:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97125#M20490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks PG so you mean this is software's problem? :smileyshocked:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 13:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97125#M20490</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T13:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97126#M20491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure output returns with 0 because there are no records in x greater then 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 13:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97126#M20491</guid>
      <dc:creator>anushakalyani</dc:creator>
      <dc:date>2013-06-06T13:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97127#M20492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks &lt;SPAN class="j-post-author "&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="7914" data-username="anushakalyani" href="https://communities.sas.com/people/anushakalyani" id="jive-791471016136912964803"&gt;anushakalyani&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Yes, i see why there is 0 because no records in x &amp;gt; 5.&amp;nbsp; but i don't know why the variable comment is missing if the count =0. i think it should be "count bigger than 5"&lt;/P&gt;&lt;P&gt;but is count not missing, comment is always not missing...&lt;/P&gt;&lt;P&gt;and my point is not why count = 0. my point is why comment is missing if count =0. but if count&amp;gt;0 comment is always no missing. Maybe my poor english doesn't make me clear...&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 14:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97127#M20492</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T14:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97128#M20493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really a bug. I suspect that the SQL standard doesn't cover that case in detail, or that the expected behavior evolved with the standard versions. I would like to know about other SQL implementations. Did you try adding &lt;STRONG&gt;GROUP BY comment&lt;/STRONG&gt;, as I suggested above? I only have SAS 9.3 installed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 14:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97128#M20493</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-06T14:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97129#M20494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still think it is most likely a coding error that you are not detecting.&lt;/P&gt;&lt;P&gt;You should post the SAS log if you can recreate the problem. Also the version of SAS and operating system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 16:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97129#M20494</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-06-06T16:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97130#M20495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! PG yes i tried group by comment but the same thing here... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97130#M20495</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T17:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97131#M20496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi! Tom&lt;/P&gt;&lt;P&gt;below is the log... no error at all... and I copied your code and run them in my home's computer and it is OK... my company's sas is 9.1 on xp...&lt;/P&gt;&lt;P&gt;and this is a old problem for me and i cannot solve it. so every time i just avoid to use proc sql although i love it...&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;106&amp;nbsp; data t;&lt;/P&gt;&lt;P&gt;107&lt;/P&gt;&lt;P&gt;108&amp;nbsp; input a $ x @@;&lt;/P&gt;&lt;P&gt;109&lt;/P&gt;&lt;P&gt;110&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.T has 5 observations and 2 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;114&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;115&lt;/P&gt;&lt;P&gt;116&amp;nbsp; proc sql ;&lt;/P&gt;&lt;P&gt;117&lt;/P&gt;&lt;P&gt;118&amp;nbsp;&amp;nbsp;&amp;nbsp; create table nocount as&lt;/P&gt;&lt;P&gt;119&lt;/P&gt;&lt;P&gt;120&amp;nbsp;&amp;nbsp;&amp;nbsp; select "no count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;121&lt;/P&gt;&lt;P&gt;122&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.NOCOUNT created, with 0 rows and 1 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;123&lt;/P&gt;&lt;P&gt;124&amp;nbsp;&amp;nbsp;&amp;nbsp; create table count as&lt;/P&gt;&lt;P&gt;125&lt;/P&gt;&lt;P&gt;126&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp; count(*) as count&lt;/P&gt;&lt;P&gt;127&lt;/P&gt;&lt;P&gt;128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; "count bigger than 5" as comment from t where x &amp;gt; 5;&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.COUNT created, with 1 rows and 2 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;129&lt;/P&gt;&lt;P&gt;130&amp;nbsp;&amp;nbsp;&amp;nbsp; create table wrongcount as&lt;/P&gt;&lt;P&gt;131&lt;/P&gt;&lt;P&gt;132&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp; count('1','2') as count&lt;/P&gt;&lt;P&gt;133&lt;/P&gt;&lt;P&gt;134&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; "count bigger than 5" as comment from t where x &amp;gt; 5&lt;/P&gt;&lt;P&gt;135&lt;/P&gt;&lt;P&gt;136&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.WRONGCOUNT created, with 0 rows and 2 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;137&lt;/P&gt;&lt;P&gt;138&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97131#M20496</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T17:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97132#M20497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your English is fine.&amp;nbsp; You may need to do as Tom said and provide your log, SAS version, and OS as well as your output.&amp;nbsp; Cut-and-paste will sometimes reveals things that our eyes miss in re-typing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran your sample code with 32 bit SAS 9.3 TS1M2 on a Win 7 Pro 64 bit OS, and the sample reported 0 as well as the comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97132#M20497</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-06-06T17:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97133#M20498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for all of your help!!&amp;nbsp; this is what i got...&amp;nbsp; my sas is 9.1.3 on xp... &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/3658_pastedImage_0.png" style="width: 1200px; height: 678px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97133#M20498</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T17:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97134#M20499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry the picture is not clear...(don't know how to make it clear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it(count dataset) looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment&lt;/P&gt;&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97134#M20499</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T17:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97135#M20500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I suspected, there is ambiguity in what SQL should return for such a query. It is not a new problem. Look at this note dating back April 2001 : &lt;A href="http://support.sas.com/kb/4/414.html" title="http://support.sas.com/kb/4/414.html"&gt;4414 - Creating a table and selecting from an empty table, or empty result setusing PROC SQL and a GROUP BY clause produces different results thanVersion 6&lt;/A&gt; . - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97135#M20500</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-06T17:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: a question about proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97136#M20501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks PG&lt;/P&gt;&lt;P&gt;so this means no way to solve this kind of problem so far except upgrade SAS or no use of proc sql... right:smileyconfused:&lt;/P&gt;&lt;P&gt;Jennifer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 18:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-question-about-proc-sql/m-p/97136#M20501</guid>
      <dc:creator>maomaochong96888_hotmail_com</dc:creator>
      <dc:date>2013-06-06T18:10:25Z</dc:date>
    </item>
  </channel>
</rss>

