<?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: Compressing Lookup Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742237#M232129</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data = have nway;
   class code;
   var flag:;
   output out = want(drop = _:) max =;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 May 2021 16:52:55 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2021-05-18T16:52:55Z</dc:date>
    <item>
      <title>Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742228#M232120</link>
      <description>&lt;P&gt;I have a large lookup table that has duplicate values. I'm joining this table based on the "code" field to other tables and adding the flag values to the other tables. Obviously in it's current format it is not possible to do because it creates a one to many join. I would like to compress this table while retaining the information in the lookup table. Below is what I have and the data set I'm trying to create (want).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input code flag1 flag2 flag3 flag4;
datalines;
4350 0 0 1 0
4350 1 0 0 0
4456 1 0 0 0
2345 0 0 0 1
1234 0 1 0 0
1234 1 0 0 0
;
run;

data want;
input code flag1 flag2 flag3 flag4;
datalines;
4350 1 0 1 0
4456 1 0 0 0
2345 0 0 0 1
1234 1 1 0 0
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know I could break this out and do the joins to the lookup table separately, but because of the size of the tables involved I'm trying to avoid that. Is there a way to do what I'm thinking?&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 16:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742228#M232120</guid>
      <dc:creator>A_SAS_Man</dc:creator>
      <dc:date>2021-05-18T16:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742229#M232121</link>
      <description>&lt;P&gt;Proc summary data=have nway;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; class code;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var flag: ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=want (drop=_:) max=;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;might do it.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 16:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742229#M232121</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-18T16:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742237#M232129</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data = have nway;
   class code;
   var flag:;
   output out = want(drop = _:) max =;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 May 2021 16:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742237#M232129</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-05-18T16:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742239#M232131</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data = have nway;
   class code;
   var flag:;
   output out = want(drop = _:) max =;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Looks familiar... &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 16:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742239#M232131</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-18T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742240#M232132</link>
      <description>&lt;P&gt;Shoot, didn't see that!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I have to come up with another way &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 16:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742240#M232132</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-05-18T16:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compressing Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742246#M232135</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Shoot, didn't see that!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I have to come up with another way &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Take it as a "great minds" thing.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 17:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compressing-Lookup-Table/m-p/742246#M232135</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-18T17:20:02Z</dc:date>
    </item>
  </channel>
</rss>

