<?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 WHERE LOGIC in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/WHERE-LOGIC/m-p/480868#M124303</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to write a code for the condition given below :-&lt;/P&gt;&lt;P&gt;All patients must have 365 days of eligibility prior to the index_date and 365 days of eligibility after the index_date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code i wrote. Is that correct ?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table DATASET_A as  
	select distinct a.*, b.period_start, b.period_stop
	from DATASET_b as a 
	inner join DATASET_c as b 
	on a.enrolid = b.enrolid 
	where ((a.index_date -365) le b.period_start le (a.index_date) AND (a.index_date) le b.period_stop ge (a.index_date +365));
quit ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Jul 2018 17:42:26 GMT</pubDate>
    <dc:creator>manya92</dc:creator>
    <dc:date>2018-07-24T17:42:26Z</dc:date>
    <item>
      <title>WHERE LOGIC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WHERE-LOGIC/m-p/480868#M124303</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to write a code for the condition given below :-&lt;/P&gt;&lt;P&gt;All patients must have 365 days of eligibility prior to the index_date and 365 days of eligibility after the index_date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code i wrote. Is that correct ?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table DATASET_A as  
	select distinct a.*, b.period_start, b.period_stop
	from DATASET_b as a 
	inner join DATASET_c as b 
	on a.enrolid = b.enrolid 
	where ((a.index_date -365) le b.period_start le (a.index_date) AND (a.index_date) le b.period_stop ge (a.index_date +365));
quit ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WHERE-LOGIC/m-p/480868#M124303</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-07-24T17:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: WHERE LOGIC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WHERE-LOGIC/m-p/480968#M124332</link>
      <description>&lt;P&gt;Assuming eligibility means what I think (you haven't told us), wouldn't this fill the criteria?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where b.PERIOD_START &amp;lt;= a.INDEX_DATE-365 and b.PERIOD_STOP &amp;gt;= a.index_date+365;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 23:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WHERE-LOGIC/m-p/480968#M124332</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-24T23:38:19Z</dc:date>
    </item>
  </channel>
</rss>

