<?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 Problem with Mod() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485123#M690262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, here I come again for a Where statement problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to select the february 29th of every year, except the bissextile ones.&lt;/P&gt;&lt;P&gt;So I have in my script :&lt;/P&gt;&lt;P&gt;(num_annee is the year, so Mod(2012,4) = 0 , there is 29 days in february )&lt;/P&gt;&lt;P&gt;LOAD `COD_COLL`,`IDENT_ID` as [ID_ABSENT],`IDENT_ID`, `IDF_AGENT`, `IDF_CLE`, `NUM_ANNEE` , `NUM_MOIS`, `NUM_JOUR`, `TYP_ARRET`, `COD_ARRET`, `COD_PAIEM`, `COD_TPAIE`, `IND_CALEND`, `IND_TRENT`, `DAT_MAJ`, `USER_MAJ`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table_calendrier: &lt;/P&gt;&lt;P&gt;SQL SELECT * &lt;/P&gt;&lt;P&gt;FROM `004 le calendrier`&lt;/P&gt;&lt;P&gt;WHERE NOT (((Mod(NUM_ANNEE),4)&amp;lt;&amp;gt;0) AND (NUM_MOIS=2) AND (NUM_JOUR=29));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gave me an error, and said that there is a missing operator. So I tried only : "Where ((Mod(2012,4))=0)", same error.&lt;/P&gt;&lt;P&gt;I don't see where the bug is. Can someone do sth for me ? Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2013 13:51:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-17T13:51:10Z</dc:date>
    <item>
      <title>Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485123#M690262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, here I come again for a Where statement problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to select the february 29th of every year, except the bissextile ones.&lt;/P&gt;&lt;P&gt;So I have in my script :&lt;/P&gt;&lt;P&gt;(num_annee is the year, so Mod(2012,4) = 0 , there is 29 days in february )&lt;/P&gt;&lt;P&gt;LOAD `COD_COLL`,`IDENT_ID` as [ID_ABSENT],`IDENT_ID`, `IDF_AGENT`, `IDF_CLE`, `NUM_ANNEE` , `NUM_MOIS`, `NUM_JOUR`, `TYP_ARRET`, `COD_ARRET`, `COD_PAIEM`, `COD_TPAIE`, `IND_CALEND`, `IND_TRENT`, `DAT_MAJ`, `USER_MAJ`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table_calendrier: &lt;/P&gt;&lt;P&gt;SQL SELECT * &lt;/P&gt;&lt;P&gt;FROM `004 le calendrier`&lt;/P&gt;&lt;P&gt;WHERE NOT (((Mod(NUM_ANNEE),4)&amp;lt;&amp;gt;0) AND (NUM_MOIS=2) AND (NUM_JOUR=29));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gave me an error, and said that there is a missing operator. So I tried only : "Where ((Mod(2012,4))=0)", same error.&lt;/P&gt;&lt;P&gt;I don't see where the bug is. Can someone do sth for me ? Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 13:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485123#M690262</guid>
      <dc:creator />
      <dc:date>2013-10-17T13:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485124#M690263</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * where &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NUM_MOIS&lt;/SPAN&gt;&amp;amp;'_'&amp;amp;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NUM_JOUR&lt;/SPAN&gt; &amp;lt;&amp;gt; '2_29';&lt;/P&gt;&lt;P&gt;Select * &lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;`004 le calendrier`;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 13:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485124#M690263</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-10-17T13:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485125#M690264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I don't want to delete the records from the years where february goes to 29 days !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 14:03:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485125#M690264</guid>
      <dc:creator />
      <dc:date>2013-10-17T14:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485126#M690265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Antonin&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not create a QlikView Master Calendar [google that you find out to do it], since Qlikview auto handles leap years having 29-Feb and the other years not and also sorts the exceptions to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then inner join this on a date field to your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;table_calendrier&lt;/EM&gt;&lt;/SPAN&gt; table and you'll only be left with valid dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If I have misunderstood what you are trying to achieve then please clarify.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 16:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485126#M690265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-17T16:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485127#M690266</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;It's weird how mod does not work in an expression alone. I attached a file.&lt;/P&gt;&lt;P&gt;1900 did not have feb 29th. Time adjustments?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 16:26:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485127#M690266</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2013-10-17T16:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485128#M690267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also your function has the parameter divisor outside of the parenthesis, and it goes inside.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 16:27:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485128#M690267</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2013-10-17T16:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485129#M690268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because 1900 wasn't a leap year:&lt;/P&gt;&lt;P&gt;&lt;A href="http://en.wikipedia.org/wiki/Leap_year" title="http://en.wikipedia.org/wiki/Leap_year"&gt;Leap year - Wikipedia, the free encyclopedia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Antonin, you can't use QV functions in a SQL statement WHERE clause. You need to check if there is a SQL function available that does the same for your DBMS or use the mod() in a LOAD statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/ms190279.aspx" title="http://technet.microsoft.com/en-us/library/ms190279.aspx"&gt;Modulo (Transact-SQL)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 16:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485129#M690268</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-17T16:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485130#M690269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Antonin, please note that what is written after "SQL" reserved word is outside QlikView domain. It´s resolved by your database and ODBC Driver. QlikView functions only resides at a LOAD comand.&lt;/P&gt;&lt;P&gt;You can rewrite it this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;table_calendrier:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_13820319108899274 jive_text_macro jive_macro_code" jivemacro_uid="_13820319108899274"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE NOT (((Mod(NUM_ANNEE),4)&amp;lt;&amp;gt;0) AND (NUM_MOIS=2) AND (NUM_JOUR=29));&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT *&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM `004 le calendrier`;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 17:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485130#M690269</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-17T17:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485131#M690270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. Leap year means exactly the same. A &lt;STRONG&gt;leap year&lt;/STRONG&gt; (or &lt;STRONG&gt;intercalary&lt;/STRONG&gt; or &lt;STRONG&gt;bissextile year)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here goes that algorithm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if&lt;/STRONG&gt; year is divisible by 400 &lt;STRONG&gt;then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; is_leap_year&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else if&lt;/STRONG&gt; year is divisible by 100 &lt;STRONG&gt;then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; not_leap_year&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else if&lt;/STRONG&gt; year is divisible by 4 &lt;STRONG&gt;then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; is_leap_year&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; not_leap_year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 07:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485131#M690270</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2013-10-18T07:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Mod()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485132#M690271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answers, I've chose the Clever's one !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 13:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Mod/m-p/485132#M690271</guid>
      <dc:creator />
      <dc:date>2013-10-18T13:27:44Z</dc:date>
    </item>
  </channel>
</rss>

