<?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 Limiting the observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64451#M14002</link>
    <description>Can we limit the observations while joining two datasets with common id x like x&amp;lt;30.&lt;BR /&gt;
Could anyone help me which is efficient in joining the datasets, is it &lt;B&gt;merge or proc sql.&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Sidhu</description>
    <pubDate>Thu, 13 Aug 2009 17:30:40 GMT</pubDate>
    <dc:creator>Siddhartha</dc:creator>
    <dc:date>2009-08-13T17:30:40Z</dc:date>
    <item>
      <title>Limiting the observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64451#M14002</link>
      <description>Can we limit the observations while joining two datasets with common id x like x&amp;lt;30.&lt;BR /&gt;
Could anyone help me which is efficient in joining the datasets, is it &lt;B&gt;merge or proc sql.&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Sidhu</description>
      <pubDate>Thu, 13 Aug 2009 17:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64451#M14002</guid>
      <dc:creator>Siddhartha</dc:creator>
      <dc:date>2009-08-13T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64452#M14003</link>
      <description>Hey Sid,&lt;BR /&gt;
use the dataset options on the imcoming datasets @ merge step or from clause in sql. Based on data that you have got, you can yourself find out which technique would be better/efficient&lt;BR /&gt;
&lt;BR /&gt;
data d1;&lt;BR /&gt;
input id name $10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
10 sushil&lt;BR /&gt;
20 sas&lt;BR /&gt;
;;;&lt;BR /&gt;
run;&lt;BR /&gt;
data d2;&lt;BR /&gt;
input id lname $10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
10 nayak&lt;BR /&gt;
20 base&lt;BR /&gt;
;;;&lt;BR /&gt;
run;&lt;BR /&gt;
data final;&lt;BR /&gt;
merge d1(in=a firstobs=1 obs=1)&lt;BR /&gt;
 d2(in=b where=(id&amp;lt;20));&lt;BR /&gt;
 by id;&lt;BR /&gt;
 if a and b;&lt;BR /&gt;
 run;&lt;BR /&gt;
 proc print;run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Things to learn and understand:&lt;BR /&gt;
WHERE= dataset option usage and working in SQL and datastep &lt;BR /&gt;
&lt;BR /&gt;
Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 13 Aug 2009 21:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64452#M14003</guid>
      <dc:creator>SushilNayak</dc:creator>
      <dc:date>2009-08-13T21:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64453#M14004</link>
      <description>The SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website has not only SAS-hosted product documentation but also supplemental technical and conference topic-related papers.  Using the website  SEARCH facility or possibly using the Google advanced search argument below revealed several interesting references to consider reviewing:&lt;BR /&gt;
&lt;BR /&gt;
proc sql merge site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 13 Aug 2009 23:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-the-observations/m-p/64453#M14004</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-13T23:02:08Z</dc:date>
    </item>
  </channel>
</rss>

