4 Replies Latest reply: Jan 7, 2014 9:50 AM by Mark campbell RSS

    Set Analysis - Nulls, Multiple Conditions, Ors

    David Koschei

      Hi everyone,

       

      I'm trying 3 things in this set analysis that I am not too comfortable with yet.

       

      My code currently looks like this:

       

      Count({$-<Employee.Manager = {'*'}, User.ID = {'90*'}, User.ID = {'5*'}>} DISTINCT User.ID)

      +

      Count({$<Employee.Manager = {'Not assigned'}, User.ID = {'90*'}, User.ID = {'5*'}>} DISTINCT User.ID)

       

      I want to Count DISTINCT User.IDs where the Employee.Manager is null, or is Not assigned.  I also only want to select user IDs that begin with 90 or 5.

       

      Note that I tried replacing all null values of Employee.Manager with 'Not assigned', but I think if User.ID doesn't exist in the Employee table, it'll show up as null no matter what.

       

      Thank you!