<?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 Creating and modifying tables and views in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34610#M8476</link>
    <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
I have a problem about creating and modifying tables and views. For example :&lt;BR /&gt;
&lt;BR /&gt;
Name	Amount	Month&lt;BR /&gt;
Johnson	400000	01JAN2007&lt;BR /&gt;
Michael	70000	04FEB2007&lt;BR /&gt;
Williams	110000	07MAR2007&lt;BR /&gt;
Morris	200000	08FEB2007&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How to get the new table or output  like this :&lt;BR /&gt;
Name     JAN     FEB MAR&lt;BR /&gt;
Johnson 400000 -       -                       &lt;BR /&gt;
Michael  -          70000 -            &lt;BR /&gt;
Williams -          -        110000&lt;BR /&gt;
Morris    -          200000 -&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.</description>
    <pubDate>Thu, 24 Dec 2009 02:03:20 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-12-24T02:03:20Z</dc:date>
    <item>
      <title>Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34610#M8476</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
I have a problem about creating and modifying tables and views. For example :&lt;BR /&gt;
&lt;BR /&gt;
Name	Amount	Month&lt;BR /&gt;
Johnson	400000	01JAN2007&lt;BR /&gt;
Michael	70000	04FEB2007&lt;BR /&gt;
Williams	110000	07MAR2007&lt;BR /&gt;
Morris	200000	08FEB2007&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How to get the new table or output  like this :&lt;BR /&gt;
Name     JAN     FEB MAR&lt;BR /&gt;
Johnson 400000 -       -                       &lt;BR /&gt;
Michael  -          70000 -            &lt;BR /&gt;
Williams -          -        110000&lt;BR /&gt;
Morris    -          200000 -&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.</description>
      <pubDate>Thu, 24 Dec 2009 02:03:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34610#M8476</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-24T02:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34611#M8477</link>
      <description>You will need to explore using PROC TRANSPOSE against your data, and also since you have a DATE variable, you will need to investigate using INTNX to reset your DATE variable creating a MONTH_START_DATE variable, with an output FORMAT suitable to your display needs.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 24 Dec 2009 03:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34611#M8477</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-24T03:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34612#M8478</link>
      <description>Why INTNX? Using the MONTH-function seems to be easier.</description>
      <pubDate>Mon, 28 Dec 2009 08:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34612#M8478</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2009-12-28T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34613#M8479</link>
      <description>From my experience, it's best to keep your SAS date variable intact when possible.  That's your decision though.  &lt;BR /&gt;
&lt;BR /&gt;
Also, I would not consider using the MONTH function at all -- reconsider an alternative approach where you assign a character variable to the first three characters of the month period using a PUT function and the SAS format MONNAME3.  and also use the UPCASE function.&lt;BR /&gt;
&lt;BR /&gt;
As usual, with the SAS language, several technical approaches exist to solve a particular problem or quest.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 28 Dec 2009 10:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34613#M8479</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-28T10:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34614#M8480</link>
      <description>data kamal;&lt;BR /&gt;
input Name $ Salary Month;&lt;BR /&gt;
datalines;&lt;BR /&gt;
Johnson  400000     01JAN2007&lt;BR /&gt;
Michael   70000       04FEB2007&lt;BR /&gt;
Williams 110000     07MAR2007&lt;BR /&gt;
Morris     200000     08FEB2007&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Create a Variable with the Month Number&lt;BR /&gt;
&lt;BR /&gt;
Data kamal1;&lt;BR /&gt;
set kamal;&lt;BR /&gt;
MonthNum = Month(Month);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Create a Array of Variables for all the months and input this data.&lt;BR /&gt;
&lt;BR /&gt;
data kamal2;&lt;BR /&gt;
set kamal1;&lt;BR /&gt;
array a[12] Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec;&lt;BR /&gt;
a[MonthNum] = Salary;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I hope this solves the problem. However there might be a easy way of doing this also. I wish to see If anyone can do this in a easier way.</description>
      <pubDate>Mon, 28 Dec 2009 11:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34614#M8480</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-28T11:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34615#M8481</link>
      <description>As recommended - consider using MONNAME format.  See pasted DOC link below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary, MONNAMEw. Format&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000201049.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000201049.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
NLS - &lt;BR /&gt;
SAS National Language Support (NLS): Reference Guide, NLDATEMNw. Format&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/a002603775.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/a002603775.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
General DOC link below on SAS Dates:&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Concepts, About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm&lt;/A&gt;</description>
      <pubDate>Mon, 28 Dec 2009 11:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34615#M8481</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-28T11:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and modifying tables and views</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34616#M8482</link>
      <description>Dear Kams,&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot for your code, now the problem is done!&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Meddy</description>
      <pubDate>Wed, 30 Dec 2009 04:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-and-modifying-tables-and-views/m-p/34616#M8482</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-30T04:01:48Z</dc:date>
    </item>
  </channel>
</rss>

