<?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: Rearrange the columns with data name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801363#M315383</link>
    <description>&lt;P&gt;Yes.&amp;nbsp; It should be before the GROUP BY .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The main reason a lot of users are writing code using PROC SQL instead just normal SAS data steps and procedures is because they already know SQL syntax and it is easier for them.&amp;nbsp;If you do not know SQL syntax then that is yet another reason to just use normal SAS process of PROC SUMMARY and PROC TRANSPOSE.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 16:01:08 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-03-10T16:01:08Z</dc:date>
    <item>
      <title>Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801317#M315359</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’m runing this code :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

create table test2 as select distinct&amp;nbsp; a.NO_POLICE, sum(MT_EA) as Encours,

a.S_TYPE_SUPPORT, a.D_VALO&amp;nbsp; from test as a

group by a.NO_POLICE, a.S_TYPE_SUPPORT, a.D_VALO;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;to get the data like this:&lt;/P&gt;
&lt;TABLE width="433"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;POLICE&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;Encours&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;S_TYPE_SUPPORT&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;D_VALO&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;X070704733&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;5501.856756&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;UC&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;X070709982&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;13748.71306&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;UC&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;X070715392&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;73757.139242&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;TXGAR&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;X070715392&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;12415.318992&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;UC&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="99"&gt;
&lt;P&gt;X080175233&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="88"&gt;
&lt;P&gt;500040.2903&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="115"&gt;
&lt;P&gt;TXGAR&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="132"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I would like to represent my result in this way :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="441"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="102.188px" height="30px"&gt;
&lt;P&gt;POLICE&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;UC&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;TXGAR&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="167.062px" height="30px"&gt;
&lt;P&gt;D_VALO&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="102.188px" height="30px"&gt;
&lt;P&gt;X070704733&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;5501.856756&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="167.062px" height="30px"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="102.188px" height="30px"&gt;
&lt;P&gt;X070709982&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;13748.71306&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="167.062px" height="30px"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="102.188px" height="30px"&gt;
&lt;P&gt;X070715392&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;12415.318992&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;73757.139242&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="167.062px" height="30px"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="102.188px" height="30px"&gt;
&lt;P&gt;X080175233&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="113.766px" height="30px"&gt;
&lt;P&gt;500040.2903&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="167.062px" height="30px"&gt;
&lt;P&gt;09MAR2022:00:00:00&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know please, the best way to do that ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help !&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801317#M315359</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-10T13:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801322#M315362</link>
      <description>&lt;P&gt;This will get you close. If you really want missing values instead of zeros in the empty columns, you'll need to use a CASE expression&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table test2 as 
   select distinct a.NO_POLICE
         ,(S_TYPE_SUPPORT='UC') * sum(MT_EA) as UC
         ,(S_TYPE_SUPPORT='TXGAR') * sum(MT_EA) as TXGAR
         , a.D_VALO
      from test as a
      group by a.NO_POLICE
             ,a.S_TYPE_SUPPORT
             ,a.D_VALO
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 14:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801322#M315362</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-03-10T14:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801329#M315366</link>
      <description>&lt;P&gt;Thank you , Jedi SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarieT_0-1646922370560.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69327i741E0A9C9D6559D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarieT_0-1646922370560.png" alt="MarieT_0-1646922370560.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know please, how to obtain, for example for&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="84"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="84"&gt;X070715392&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;the result in one line :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarieT_0-1646924671166.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69335iE018F2708E7ECA9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarieT_0-1646924671166.png" alt="MarieT_0-1646924671166.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I nested&amp;nbsp; sum(S_TYPE_SUPPORT='UC') * sum(MT_EA)&amp;nbsp; as sum( sum(S_TYPE_SUPPORT='UC') * sum(MT_EA) ) but it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801329#M315366</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-10T15:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801338#M315371</link>
      <description>&lt;P&gt;Using values of variables as names of new variables is what PROC TRANSPOSE does.&lt;/P&gt;
&lt;P&gt;So if you have this data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length POLICE $10 D_VALO 8 S_TYPE_SUPPORT $32 Encours 8;
  input POLICE Encours S_TYPE_SUPPORT D_VALO :datetime.;
  format d_valo datetime19.;
cards;
X070704733 5501.856756 UC 09MAR2022:00:00:00
X070709982 13748.71306 UC 09MAR2022:00:00:00
X070715392 73757.139242 TXGAR 09MAR2022:00:00:00
X070715392 12415.318992 UC 09MAR2022:00:00:00
X080175233 500040.2903 TXGAR 09MAR2022:00:00:00
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can run this step&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have out=want(drop=_name_);
  by police d_valo;
  id s_type_support;
  var encours;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To get this output&lt;/P&gt;
&lt;PRE&gt;Obs      POLICE                   D_VALO       UC         TXGAR

 1     X070704733     09MAR2022:00:00:00     5501.86          .
 2     X070709982     09MAR2022:00:00:00    13748.71          .
 3     X070715392     09MAR2022:00:00:00    12415.32     73757.14
 4     X080175233     09MAR2022:00:00:00         .      500040.29

&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 14:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801338#M315371</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-10T14:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801343#M315373</link>
      <description>&lt;P&gt;Thank you, Tom.&lt;/P&gt;
&lt;P&gt;I think that proc sql is better for the huge data ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In my proc sql I want to add the sum to have the data in one line : like 0+121415&amp;nbsp; but I don't know how to do it :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarieT_0-1646924515304.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69334iC5C1A8694102CF5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarieT_0-1646924515304.png" alt="MarieT_0-1646924515304.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;k.S_TYPE_SUPPORT, datepart(k.D_VALO) as D_VALO, (S_TYPE_SUPPORT='UC') * sum(MT_EA) as UC
          ,(S_TYPE_SUPPORT='TXGAR') * sum(MT_EA) as TXGAR,(S_TYPE_SUPPORT='DEDIE') * sum(MT_EA) as DEDIE&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801343#M315373</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-10T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801348#M315375</link>
      <description>&lt;P&gt;Just don't group by&amp;nbsp;S_TYPE_SUPPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table test2 as 
select a.NO_POLICE "POLICE"
      ,sum((S_TYPE_SUPPORT='UC') * MT_EA) as UC
      ,sum((S_TYPE_SUPPORT='TXGAR') * MT_EA) as TXGAR
      ,a.D_VALO
   from test as a
   group by a.NO_POLICE
           ,a.D_VALO
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure SQL: Query Results" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;POLICE&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;UC&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;TXGAR&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;D_VALO&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X070704733&lt;/TD&gt;
&lt;TD class="r data"&gt;5501.857&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;09MAR2022:00:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X070709982&lt;/TD&gt;
&lt;TD class="r data"&gt;13748.71&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;09MAR2022:00:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X070715392&lt;/TD&gt;
&lt;TD class="r data"&gt;12415.32&lt;/TD&gt;
&lt;TD class="r data"&gt;73757.14&lt;/TD&gt;
&lt;TD class="r data"&gt;09MAR2022:00:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X080175233&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;500040.3&lt;/TD&gt;
&lt;TD class="r data"&gt;09MAR2022:00:00:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801348#M315375</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-03-10T15:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801349#M315376</link>
      <description>&lt;P&gt;You should check whether PROC SUMMARY would do a better job of the summarization than PROC SQL.&amp;nbsp; That is what it is designed to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do want to use PROC SQL then do not include the variable name as one of the columns.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select police
     , d_valo
     , sum(case when (S_TYPE_SUPPORT='UC') then MT_EA else . end) as UC
     , sum(case when (S_TYPE_SUPPORT='TXGAR') then MT_EA else . end) as TXGAR
from have
group by police, d_valo
where&amp;nbsp;S_TYPE_SUPPORT in&amp;nbsp;('UC','TXGAR')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801349#M315376</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-10T15:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801356#M315382</link>
      <description>Thank you, Tom,&lt;BR /&gt;&lt;BR /&gt;Where I must write thise line please : where S_TYPE_SUPPORT in ('UC','TXGAR') ? Befor the group by ?</description>
      <pubDate>Thu, 10 Mar 2022 15:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801356#M315382</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-10T15:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801363#M315383</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; It should be before the GROUP BY .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The main reason a lot of users are writing code using PROC SQL instead just normal SAS data steps and procedures is because they already know SQL syntax and it is easier for them.&amp;nbsp;If you do not know SQL syntax then that is yet another reason to just use normal SAS process of PROC SUMMARY and PROC TRANSPOSE.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 16:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801363#M315383</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-10T16:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rearrange the columns with data name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801410#M315400</link>
      <description>Thank you, Tom&lt;BR /&gt;I'm learning the sql. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rearrange-the-columns-with-data-name/m-p/801410#M315400</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-10T18:07:04Z</dc:date>
    </item>
  </channel>
</rss>

