<?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 use nodupkey in query builder in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438202#M28304</link>
    <description>&lt;P&gt;I'm aware of that, NODUPRECS requires data side by side, i.e. the double sort required for appropriate usage.&lt;/P&gt;
&lt;P&gt;I think it should mimic the SQL DISTINCT, not be deprecated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Feb 2018 21:33:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-17T21:33:35Z</dc:date>
    <item>
      <title>How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/437883#M28267</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;can anyone help in using of nodupkey by id in sas eg query builder&lt;/P&gt;&lt;P&gt;please need it very fast.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 05:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/437883#M28267</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2018-02-16T05:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/437901#M28268</link>
      <description>&lt;P&gt;Why not use the sort task instead, and use NODUPKEY in that?&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 07:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/437901#M28268</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-02-16T07:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438013#M28271</link>
      <description>&lt;P&gt;You use DISTINCT in Query Builder.&lt;/P&gt;
&lt;P&gt;There's a check box at the bottom to 'Select Distinct Rows Only'&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 16:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438013#M28271</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-16T16:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438077#M28274</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I know you know this: A SQL DISTINCT return unique rows and though is not necessarily the same like a Proc Sort NODUPKEY which will return unique key combination and drops other observations even if there are differences between other non key variables.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 21:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438077#M28274</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-02-16T21:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438078#M28275</link>
      <description>&lt;P&gt;Doesn't that partly depend on where you place the distinct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I know you know this: A SQL DISTINCT return unique rows and though is not necessarily the same like a Proc Sort NODUPKEY which will return unique key combination and drops other observations even if there are differences between other non key variables.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 21:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438078#M28275</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-16T21:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438080#M28277</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Doesn't that partly depend on where you place the distinct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I know you know this: A SQL DISTINCT return unique rows and though is not necessarily the same like a Proc Sort NODUPKEY which will return unique key combination and drops other observations even if there are differences between other non key variables.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;Not sure but I might be missing something. Using below code can you please demonstrate how you would use a DISTINCT to get the same result in want2 than what's in want1.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  do var=5 to 8;
    do id=1 to 3;
      output;
    end;
  end;
run;

proc sort data=have out=want1 nodupkey;
  by id;
run;

proc sql;
  create table want2 as
  select distinct *
  from have
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 21:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438080#M28277</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-02-16T21:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438129#M28288</link>
      <description>&lt;P&gt;In this particular case I don't think you can. It depends on the query, and I was thinking primarily of cases where you're doing summary queries and have a either a distinct or count(distinct) which operates differently.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you're correct, in that NODUPKEY and DISTINCT are not the same, but I think NODUPRECS and DISTINCT are the same. However, SQL doesn't give you good control over the record it removes, whereas PROC SORT or a DATA STEP will give you more control.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2018 03:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438129#M28288</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-17T03:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438133#M28289</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Agree with all you write except for NODUPRECS which in my opinion is a sort option which should get depreciated. Check out below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  input id var;
  datalines;
1 1
1 1
1 2
1 1
;
run;

proc sort data=sample out=result noduprecs;
  by id;
run;

proc print data=result;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 97px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18662i3E8F1519C6F27C6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2018 08:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438133#M28289</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-02-17T08:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438202#M28304</link>
      <description>&lt;P&gt;I'm aware of that, NODUPRECS requires data side by side, i.e. the double sort required for appropriate usage.&lt;/P&gt;
&lt;P&gt;I think it should mimic the SQL DISTINCT, not be deprecated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2018 21:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438202#M28304</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-17T21:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nodupkey in query builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438221#M28312</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;You get the Distinct via NODUPKEY and sort BY _ALL_&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 00:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-nodupkey-in-query-builder/m-p/438221#M28312</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-02-18T00:27:53Z</dc:date>
    </item>
  </channel>
</rss>

