<?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: date group issue in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/date-group-issue/m-p/58761#M16515</link>
    <description>Nothing wrong about your query, unless this part:&lt;BR /&gt;
[pre]&lt;BR /&gt;
AND WKLY_SLS_Q 0&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Which I suspect should be:&lt;BR /&gt;
[pre]&lt;BR /&gt;
AND WKLY_SLS_Q eq 0&lt;BR /&gt;
[/pre]&lt;BR /&gt;
But it could be a typo.&lt;BR /&gt;
&lt;BR /&gt;
Everything else should work has supposed.&lt;BR /&gt;
&lt;BR /&gt;
I'm also assuming that, although you are not keeping COST_A, it does exists in work.STORE_SLS and is necessary to group the variables.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
    <pubDate>Wed, 17 Feb 2010 17:46:30 GMT</pubDate>
    <dc:creator>DanielSantos</dc:creator>
    <dc:date>2010-02-17T17:46:30Z</dc:date>
    <item>
      <title>date group issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-group-issue/m-p/58760#M16514</link>
      <description>I'm having an issue where my code is changing a date into a character.  I found out that it's when I'm grouping by two dependant variables when rolling other information.  Here is the code that gives me the character date:&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table work.store_sls_next as SELECT&lt;BR /&gt;
DEPT_I, &lt;BR /&gt;
CLASS_I,&lt;BR /&gt;
ITEM_I, &lt;BR /&gt;
STORE_I,&lt;BR /&gt;
RETL_A,&lt;BR /&gt;
SUM(TOT_SLS_A) AS TOT_SLS_A,&lt;BR /&gt;
SUM(WKLY_SLS_Q) AS TOT_SLS_Q,&lt;BR /&gt;
"&amp;amp;date"d as wk_end_date&lt;BR /&gt;
FROM work.STORE_SLS&lt;BR /&gt;
 where dept_i in (&amp;amp;dept_list)&lt;BR /&gt;
	AND WKLY_SLS_Q &amp;lt;&amp;gt; 0&lt;BR /&gt;
	AND class_i in (&amp;amp;class_list)&lt;BR /&gt;
	AND item_i in (&amp;amp;item_list)&lt;BR /&gt;
group by DEPT_I, CLASS_I, ITEM_I, STORE_I, &lt;B&gt;RETL_A, COST_A&lt;/B&gt;;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Note that the "&amp;amp;date"d is reading in correctly as a date.  The bold part is what seems to be causing the issue.  When I exclude that section, the date comes through correctly.  Any ideas why?</description>
      <pubDate>Wed, 17 Feb 2010 17:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-group-issue/m-p/58760#M16514</guid>
      <dc:creator>statrick</dc:creator>
      <dc:date>2010-02-17T17:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: date group issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-group-issue/m-p/58761#M16515</link>
      <description>Nothing wrong about your query, unless this part:&lt;BR /&gt;
[pre]&lt;BR /&gt;
AND WKLY_SLS_Q 0&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Which I suspect should be:&lt;BR /&gt;
[pre]&lt;BR /&gt;
AND WKLY_SLS_Q eq 0&lt;BR /&gt;
[/pre]&lt;BR /&gt;
But it could be a typo.&lt;BR /&gt;
&lt;BR /&gt;
Everything else should work has supposed.&lt;BR /&gt;
&lt;BR /&gt;
I'm also assuming that, although you are not keeping COST_A, it does exists in work.STORE_SLS and is necessary to group the variables.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Wed, 17 Feb 2010 17:46:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-group-issue/m-p/58761#M16515</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-02-17T17:46:30Z</dc:date>
    </item>
  </channel>
</rss>

