2 Replies Latest reply: Aug 24, 2017 11:19 AM by Edney Matias RSS

    How to check for the existence of relationship featuring a desired attribute?

    Edney Matias

      Hi there!

       

      I have this dataset

       

      Employees:

      IDName
      1John
      2Smith
      3Joe

       

      Offices:

      IDCity
      1New York
      2London

       

      Activities:

      IDDescription
      1Manager
      2Operator
      3Director

       

      Employes_Offices_Activities:

      EmployeIDOfficeIDActivitieIDEnabled
      111True
      112False
      223True
      311False
      321False

       

      I want to load Employee with an extra flag that determines if it's active or not. One employee will be active if he has one enabled activity in at least one office. Otherwise, he will be not active. I intend to get this Employee table:

       

      Employee:

      IDNameActive
      1JohnYes
      2SmithYes
      3JoeNo

       

      Joe is not active since he has no enabled activity in any office.

       

      How can I perform this load? It would be great if you could provide some guidance. I'll appreciate a lot!

       

      Thank you!

       

      Matias