<?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 Query for next three days if two set of dates are equal in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193578#M14727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I want to run a query based on the logic below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;If&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;t1.PlayerDayDate=t2.NewEnrollmentDate then get the next three days of&amp;nbsp; t1.PlayerDayDate of that respective patron.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I want to see when a customer enrolled on that day and play (hence playdate=new enrollmentdate) then also get the next three days transaction or play days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 22:06:40 GMT</pubDate>
    <dc:creator>sdang</dc:creator>
    <dc:date>2015-05-26T22:06:40Z</dc:date>
    <item>
      <title>Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193578#M14727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I want to run a query based on the logic below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;If&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;t1.PlayerDayDate=t2.NewEnrollmentDate then get the next three days of&amp;nbsp; t1.PlayerDayDate of that respective patron.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I want to see when a customer enrolled on that day and play (hence playdate=new enrollmentdate) then also get the next three days transaction or play days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 22:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193578#M14727</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-05-26T22:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193579#M14728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should provide a couple of small example data sets and what the desired output would look like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 23:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193579#M14728</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-05-26T23:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193580#M14729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below are the results of filtering &lt;SPAN style="font-size: 12pt;"&gt;t1.PlayerDayDate=t2.NewEnrollmentDate.&amp;nbsp; Now I want the next three PlayerDayDate since the day that they enrolled. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Data are taken from WORK.QUERY_FOR_TOTALGAMINGADDRES_0001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/10611_Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 23:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193580#M14729</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-05-26T23:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193581#M14730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope this can be done in EG. Assuming both your dates are datetimes, use &lt;STRONG&gt;INTCK&lt;/STRONG&gt; to count the number of days between play and enrolment :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table nextDays as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select t2.newEnrolmentDate, t1.*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; PlayerDays as t1 inner join &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Enrolments as t2 on&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.guestNumber=t2.guestNumber and &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intck("DTDAY", t2.newEnrolmentDate, t1.PlayerDayDate) between 0 and 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(untested)&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 02:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193581#M14730</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-05-27T02:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193582#M14731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; You solved my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193582#M14731</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-05-27T15:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193583#M14732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tested it, but I believe it would be doable with the EG query builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193583#M14732</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2015-05-27T15:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query for next three days if two set of dates are equal</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193584#M14733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Query-for-next-three-days-if-two-set-of-dates-are-equal/m-p/193584#M14733</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-05-27T15:28:05Z</dc:date>
    </item>
  </channel>
</rss>

