<?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 or report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sql-or-report/m-p/61341#M13319</link>
    <description>From your SUBJECT, it appears that you are looking for feedback on which approach to take - that being "PROC SQL or PROC REPORT"?  &lt;BR /&gt;
&lt;BR /&gt;
Of course, a DATA step approach allows ultimate flexibility, however a combination of PROC TRANSPOSE and PROC REPORT (or maybe only PROC REPORT with ACROSS, but maybe not with those desired column headings you show) would do the job.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Mon, 03 Aug 2009 20:45:31 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-08-03T20:45:31Z</dc:date>
    <item>
      <title>sql or report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-report/m-p/61340#M13318</link>
      <description>The data set has the following variables:&lt;BR /&gt;
&lt;BR /&gt;
Last_Name First_Name City State  Zip GHTM  date  drug   mg_dispensed&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1.date has the values from Jan 2008 and is in the format date9.&lt;BR /&gt;
2.drug has two categories:&lt;BR /&gt;
   Competitor and Nordi.&lt;BR /&gt;
3.Mg_dispensed is the mg dispensed for drug numeric.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
output:&lt;BR /&gt;
Last_Name First_Name City State  Zip  GHTM Q1_09_Total_mg Q1_09_Nordi Q2_09_Total_mg Q2_09_Nordi....Q1_08_Total_mg Q1_08_Nordi_mg&lt;BR /&gt;
John       Peter     abc  pq    12345   JSEQ     36542          24.3%&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
in the output:&lt;BR /&gt;
&lt;BR /&gt;
Q1_09_Total_mg is the total mg dispensed by the physician i.e sum of competitor and Nordi in the first qtr of 09.&lt;BR /&gt;
Q1_09_Nordi is the total nordi share in the first qtr of 09.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Actually , the quarters appear  from current qtr ,(2009 second qtr) to 2008 all four qtrs in the report.</description>
      <pubDate>Mon, 03 Aug 2009 20:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-report/m-p/61340#M13318</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-08-03T20:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: sql or report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-report/m-p/61341#M13319</link>
      <description>From your SUBJECT, it appears that you are looking for feedback on which approach to take - that being "PROC SQL or PROC REPORT"?  &lt;BR /&gt;
&lt;BR /&gt;
Of course, a DATA step approach allows ultimate flexibility, however a combination of PROC TRANSPOSE and PROC REPORT (or maybe only PROC REPORT with ACROSS, but maybe not with those desired column headings you show) would do the job.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 03 Aug 2009 20:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-report/m-p/61341#M13319</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-03T20:45:31Z</dc:date>
    </item>
  </channel>
</rss>

