3 Replies Latest reply: Jul 12, 2013 3:30 AM by Bernard Herrok RSS

    Set Analysis using Exists and OR

      Hi Community,

       

      I'm trying to replicate the following logical rule in QlikView using Set Analysis:

       

      (appointments where the starting planned date is less than the current report date

           AND appointments where the created date is less than the current report date)


      AND

       

      (appointments where the actual starting is greater than the current report date

           OR appointment is planned)

       

      Essentially the SQL statement looks like (assuming the report date is 2013-06-30):

       

      WHERE [Planned_Appointment_Start_Date] < '2013-06-30'

        AND [Appointment_Created_Date] < '2013-06-30' 

                AND ([Appointment_Start_Date] > '2013-06-30'

                               OR [Is_Planned_Appointment] = 1)


      Can anyone please assist?

       

      Thanks in advanced.