9 Replies Latest reply: Oct 18, 2013 9:27 AM by Antonin Ramet RSS

    Problem with Mod()

      Hi, here I come again for a Where statement problem.


      I don't want to select the february 29th of every year, except the bissextile ones.

      So I have in my script :

      (num_annee is the year, so Mod(2012,4) = 0 , there is 29 days in february )




      SQL SELECT *

      FROM `004 le calendrier`

      WHERE NOT (((Mod(NUM_ANNEE),4)<>0) AND (NUM_MOIS=2) AND (NUM_JOUR=29));


      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.

      I don't see where the bug is. Can someone do sth for me ? Thanks a lot.