<?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: how to implement qualify statement in SAS DI? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118007#M1408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you mean by "qualify", "over" etc.&lt;/P&gt;&lt;P&gt;Depending of the requirement, there are several ways to keep only one row per group variable value.&lt;/P&gt;&lt;P&gt;These includes SAS Sort, Distinct in Extract or Join, or using group By in Extract/Join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2013 10:17:06 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-01-08T10:17:06Z</dc:date>
    <item>
      <title>how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118006#M1407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a requirement to group the records based on a field and extract only one record from each group.&lt;/P&gt;&lt;P&gt;Kind of using statements like,&lt;/P&gt;&lt;P&gt;qualify(row number()over(partition by order by)).&lt;/P&gt;&lt;P&gt;How to implement this in SAS DI over SAS Datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 09:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118006#M1407</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-08T09:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118007#M1408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you mean by "qualify", "over" etc.&lt;/P&gt;&lt;P&gt;Depending of the requirement, there are several ways to keep only one row per group variable value.&lt;/P&gt;&lt;P&gt;These includes SAS Sort, Distinct in Extract or Join, or using group By in Extract/Join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 10:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118007#M1408</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-08T10:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118008#M1409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The requirement is like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col_2&lt;/P&gt;&lt;P&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abc&lt;/P&gt;&lt;P&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bcd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abc&lt;/P&gt;&lt;P&gt;234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bcd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i want the output of reords like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col_2&lt;/P&gt;&lt;P&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abc&lt;/P&gt;&lt;P&gt;234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i meant, partition_by Col_1, order_by Col_2 Asc, qualify the statments whose row_number =1&lt;/P&gt;&lt;P&gt;It typically means assigning a row&amp;nbsp; number after the order by and partition by and fetch the records with row_number =1&lt;/P&gt;&lt;P&gt;I can find this function in SAS DI if the source is a Teradata table. But not sure of how to implement this for SAS Datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 10:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118008#M1409</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-08T10:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118009#M1410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to pick the first record for a group by value, then SAS sort is what you need, no need to assign temporary row number (unless you want to keep them for some other purpose).&lt;/P&gt;&lt;P&gt;If like/need to specify Teradata syntax, try to use explicit SQL pass-thru.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 11:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118009#M1410</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-08T11:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118010#M1411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With sas sort transformation, we dont have a group by. I want to order the the fields within a particular group and i need one record from each group as the output. My source is SAS dataset. Not teradata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So could you please tell us a possible solution to achieve this?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 09:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118010#M1411</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-10T09:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118011#M1412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you need group by for?&lt;/P&gt;&lt;P&gt;Be clear on why you can't use SAS sort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 10:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118011#M1412</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-10T10:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118012#M1413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the example i mentioned above, i want to group the columns based on Col_1 and want to sort within the group, so that i can pick the first record from each group. This is the requirment. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 11:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118012#M1413</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-10T11:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118013#M1414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to pre-sort the data, before the SAS sort step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 13:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118013#M1414</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-10T13:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118014#M1415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus, could you please me more clear. I wanna know how can we achieve this using a sort transformation alone? Is there any option in SORT transformation where we can sort within a group and filter only one record out of the group?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 09:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118014#M1415</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-11T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118015#M1416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Step one: Sort your data both according to your group and subgroup.&lt;/P&gt;&lt;P&gt;Step two: Sort by your group, and select option NODUPKEY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 09:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118015#M1416</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-11T09:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to implement qualify statement in SAS DI?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118016#M1417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Linush. Its working fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 09:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-implement-qualify-statement-in-SAS-DI/m-p/118016#M1417</guid>
      <dc:creator>Sandhyaa</dc:creator>
      <dc:date>2013-01-15T09:17:17Z</dc:date>
    </item>
  </channel>
</rss>

