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

    Problem with Mod()

    Antonin Ramet

      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 )

      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`;

       

      table_calendrier:

      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.