<?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: Increasing variable (while/sql) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186263#M265689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to compare with some holidays on my holiday_table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2014 23:29:45 GMT</pubDate>
    <dc:creator>Krohn</dc:creator>
    <dc:date>2014-10-15T23:29:45Z</dc:date>
    <item>
      <title>Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186260#M265686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'd like to increase a variable (payday) + 1 while it isn't a working day&lt;/P&gt;&lt;P&gt;how can i do something like that, using while and sql?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table new_payday as select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (while payday in ((select holiday from holiday_table),weekday(1),weekday(7)) then payday+1) as payday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from old_payday;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 20:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186260#M265686</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2014-10-15T20:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186261#M265687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but I think you are trying something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table new_payday as&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt; case when weekday(datepart(payday))&amp;nbsp; in (1,7) then payday+1 else payday end as payday&lt;/P&gt;&lt;P&gt;from old_payday;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 20:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186261#M265687</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-15T20:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186262#M265688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it was Saturday that would make the payday Sunday so that logic doesn't make sense for most businesses I know....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look up the intnx function with the weekday option.&lt;/P&gt;&lt;P&gt;You can also create custom intervals to include your holidays, there's a few posts on here that cover how to do that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 22:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186262#M265688</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-15T22:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186263#M265689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to compare with some holidays on my holiday_table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 23:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186263#M265689</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2014-10-15T23:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186264#M265690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A bit of a long read, but worth it, the very last example is what I'm referring to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Generating_Holiday_Lists" title="http://www.sascommunity.org/wiki/Generating_Holiday_Lists"&gt;Generating Holiday Lists - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 00:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186264#M265690</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-16T00:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186265#M265691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tomorrow im going to test it :smileygrin: &lt;/P&gt;&lt;P&gt;i can only test at job.....thanks &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;is there a way of using "while" inside proc sql?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 02:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186265#M265691</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2014-10-16T02:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing variable (while/sql)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186266#M265692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're looking for where instead. I'm not familiar with while in SQL though it's getting rusty... &lt;/P&gt;&lt;P&gt;However the intervalds option methodology with customized dataset would render that requirement for this question moot. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 03:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Increasing-variable-while-sql/m-p/186266#M265692</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-16T03:33:23Z</dc:date>
    </item>
  </channel>
</rss>

