2 Replies Latest reply: Nov 6, 2015 8:06 PM by Shawn Ng RSS

    How to state "not equal to current month" under script

    Shawn Ng

      Hi,

      I am not sure how to state "not equal to current month" under script

       

      NinthStats2:    //Table name

      NoConcatenate Load

          ...

          ...

          ninth_LastRead_MY          //format is 'MMM-YYYY', e.g. Jan 2015, Feb 2015...

          if(month(ninth_LastRead_MY)<>month(today()),'Inactive','Active') as ninth_activity

      Resident NinthStats1;

      Drop Table NinthStats1;

       

      The error I got:

       

      As I want to create a column (ninth_activity) that is either Inactive or active.

      So if month(ninth_LastRead_MY) is not equal to month(today()) which is Nov, it will be inactive, otherwise active.

       

      Thank you!

       

      Update: I miss out a (,) before 'if', problem solved