<?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 Finding obs in one table and output in another table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20455#M3204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at: &lt;A href="http://support.sas.com/kb/12/062.html"&gt;http://support.sas.com/kb/12/062.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2011 13:34:06 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-12-27T13:34:06Z</dc:date>
    <item>
      <title>Finding obs in one table and output in another table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20451#M3200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data&amp;nbsp; Table1(drop=sdt edt);&lt;BR /&gt;input sdt$ 1-9 edt$ 10-20 comm_cou;&lt;BR /&gt;stdate =input(sdt,date9.);&lt;BR /&gt;enddate=input(edt,date9.);&lt;BR /&gt;format stdate enddate ddmmyy10.;&lt;BR /&gt;cards;&lt;BR /&gt;12mar2011 13mar2011 usa&lt;BR /&gt;13mar2011 14mar2011 usa&lt;BR /&gt;14mar2011 15mar2011 usa&lt;BR /&gt;15mar2011 16mar2011 usa&lt;BR /&gt;16mar2011 17mar2011 usa&lt;BR /&gt;17mar2011 18mar2011 usa&lt;BR /&gt;18mar2011 19mar2011 usa&lt;BR /&gt;19mar2011 20mar2011 usa&lt;BR /&gt;20mar2011 21mar2011 usa &lt;/P&gt;&lt;P&gt;12mar2011 13mar2011 uk&lt;BR /&gt;13mar2011 14mar2011 uk&lt;BR /&gt;14mar2011 15mar2011 uk&lt;BR /&gt;15mar2011 16mar2011 uk&lt;BR /&gt;16mar2011 17mar2011 uk&lt;BR /&gt;17mar2011 18mar2011 uk&lt;BR /&gt;18mar2011 19mar2011 uk&lt;BR /&gt;19mar2011 20mar2011 uk&lt;BR /&gt;20mar2011 21mar2011 uk&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Table 2:&lt;/P&gt;&lt;P&gt;14mar2011 15mar2011 usa &lt;/P&gt;&lt;P&gt;Table 3:&lt;/P&gt;&lt;P&gt;15mar2011 16mar2011 usa&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the above table i am having the dates table_1 having the dates and comm_cou &lt;BR /&gt;in table_2 i am having dates and commn country i wnat table_3 which is having enddate in table 2 and it should be&lt;BR /&gt;stdate&amp;nbsp; of table_1 only with one observation only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 11:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20451#M3200</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Finding obs in one table and output in another table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20452#M3201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I am having Table1 and Table2 i want Table3 as output.(I want the output in Table 3 as enddate of table2 &lt;/P&gt;&lt;P&gt;=stdate of table1 to Table 3(AS Output)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 13:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20452#M3201</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T13:05:03Z</dc:date>
    </item>
    <item>
      <title>Finding obs in one table and output in another table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20453#M3202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of ways to do what you want.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; Table1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat stdate enddate date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input&amp;nbsp; stdate enddate comm_cou $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format stdate enddate ddmmyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;12mar2011 13mar2011 usa&lt;/P&gt;&lt;P&gt;13mar2011 14mar2011 usa&lt;/P&gt;&lt;P&gt;14mar2011 15mar2011 usa&lt;/P&gt;&lt;P&gt;15mar2011 16mar2011 usa&lt;/P&gt;&lt;P&gt;16mar2011 17mar2011 usa&lt;/P&gt;&lt;P&gt;17mar2011 18mar2011 usa&lt;/P&gt;&lt;P&gt;18mar2011 19mar2011 usa&lt;/P&gt;&lt;P&gt;19mar2011 20mar2011 usa&lt;/P&gt;&lt;P&gt;20mar2011 21mar2011 usa&lt;/P&gt;&lt;P&gt;12mar2011 13mar2011 uk&lt;/P&gt;&lt;P&gt;13mar2011 14mar2011 uk&lt;/P&gt;&lt;P&gt;14mar2011 15mar2011 uk&lt;/P&gt;&lt;P&gt;15mar2011 16mar2011 uk&lt;/P&gt;&lt;P&gt;16mar2011 17mar2011 uk&lt;/P&gt;&lt;P&gt;17mar2011 18mar2011 uk&lt;/P&gt;&lt;P&gt;18mar2011 19mar2011 uk&lt;/P&gt;&lt;P&gt;19mar2011 20mar2011 uk&lt;/P&gt;&lt;P&gt;20mar2011 21mar2011 uk&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; Table2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat stdate enddate date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input&amp;nbsp; stdate enddate comm_cou $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format stdate enddate ddmmyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;14mar2011 15mar2011 usa&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table table3 as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select a.stdate, a.enddate, a.comm_cou&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from table1 as a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right join table2 as b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.stdate=b.enddate and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.comm_cou=b.comm_cou&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 15:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20453#M3202</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-26T15:52:08Z</dc:date>
    </item>
    <item>
      <title>Finding obs in one table and output in another table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20454#M3203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thqs art it worked and i want to keep directly table 3 only and changed the logi in the join as done liket this i am getting the warning &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql nowarn;&lt;BR /&gt;&amp;nbsp; create table table3 as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select a.stdate, a.enddate, a.comm_cou&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from table1 as a&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right join table3 as b&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.stdate=b.enddate and&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.comm_cou=b.comm_cou&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;quit; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: This CREATE TABLE statement recursively references the target table. A consequence of this &lt;BR /&gt;is a possible data integrity&amp;nbsp;&amp;nbsp; problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i supress the warning tryed to keep nowarn but not working&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 06:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20454#M3203</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-27T06:36:26Z</dc:date>
    </item>
    <item>
      <title>Finding obs in one table and output in another table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20455#M3204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at: &lt;A href="http://support.sas.com/kb/12/062.html"&gt;http://support.sas.com/kb/12/062.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 13:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-obs-in-one-table-and-output-in-another-table/m-p/20455#M3204</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-27T13:34:06Z</dc:date>
    </item>
  </channel>
</rss>

