<?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: I want to change the column order in large dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193010#M48445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's several techniques to archive this you can check a few in the links bellow, but i think you need always to re-write the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/Re-ordering_variables" title="http://www.sascommunity.org/wiki/Re-ordering_variables"&gt;Re-ordering variables - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/8/395.html" title="http://support.sas.com/kb/8/395.html"&gt;8395 - How to reorder the variables in a SAS® data set&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 15:27:49 GMT</pubDate>
    <dc:creator>BrunoSilva</dc:creator>
    <dc:date>2015-05-26T15:27:49Z</dc:date>
    <item>
      <title>I want to change the column order in large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193006#M48441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table with 16 million rows and I would to add a column to the table which I did with :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alter table A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add green num format 8.&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have now is that I want the columns to be in a specific order. Let's say that I want the new column to be the first one when you read from left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a clue about how I can do that without creating a new table or read up the whole dateset again(because it takes about one hour)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 08:50:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193006#M48441</guid>
      <dc:creator>AZ_KI</dc:creator>
      <dc:date>2015-05-26T08:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: I want to change the column order in large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193007#M48442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about creating a VIEW not TABLE ,if you have a big table .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 12:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193007#M48442</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-26T12:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: I want to change the column order in large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193008#M48443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need them in a certain order?&amp;nbsp; It is irrelevant in programming except in certain situations.&amp;nbsp; If it is reporting then set the order in the report program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 13:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193008#M48443</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-05-26T13:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: I want to change the column order in large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193009#M48444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because the ordering of the columns is part of the physical file layout, you cannot reorder the variables without rewriting the dataset.&lt;/P&gt;&lt;P&gt;Since you also need to rewrite the whole dataset to add a column, you can specify the new ordering at this moment.&lt;/P&gt;&lt;P&gt;a) by specifying the wanted order in the SELECT part of a CREATE TABLE statement in PROC SQL.&lt;/P&gt;&lt;P&gt;b) by specifying the variable ordering in an "empty" FORMAT statement &lt;SPAN style="text-decoration: underline;"&gt;before&lt;/SPAN&gt; the SET statement in a DATA step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 13:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193009#M48444</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-05-26T13:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: I want to change the column order in large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193010#M48445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's several techniques to archive this you can check a few in the links bellow, but i think you need always to re-write the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/Re-ordering_variables" title="http://www.sascommunity.org/wiki/Re-ordering_variables"&gt;Re-ordering variables - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/8/395.html" title="http://support.sas.com/kb/8/395.html"&gt;8395 - How to reorder the variables in a SAS® data set&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-want-to-change-the-column-order-in-large-dataset/m-p/193010#M48445</guid>
      <dc:creator>BrunoSilva</dc:creator>
      <dc:date>2015-05-26T15:27:49Z</dc:date>
    </item>
  </channel>
</rss>

