Employees for whom a request can be placed

Hi All,

Getting myself a little stuck here - just wondering if someone can help with a quick solution.

I am trying to update the configuration in IT Shop for "Employees for whom a request can be placed" - in theory my requirements are simple:

  • If you are a manager, then you can place a request for your direct reports
  • If you are in AERole = 'helpdesk', then you can place a request for anyone

For some reason, I don't seem to be able to get the SQL quite right.  Tried a few different CASE statements, but it's not working.... does anyone have a simple SQL that I can use?

Thanks

Paul

Parents
  • I do not know if this is the optimal solution but it should do the trick (Assuming that the original condition including the mangers but not restricted to is fine).

    (1=1 AND Exists (Select 1 from PersonInAERole Where UID_Person = '%useruid%' and UID_AERole = 'AOB-AEROLE-ADMIN'))
    OR
    (uid_person in ( select uid_person from QER_VEditEmployee where uid_personhead = '%useruid%'))

Reply
  • I do not know if this is the optimal solution but it should do the trick (Assuming that the original condition including the mangers but not restricted to is fine).

    (1=1 AND Exists (Select 1 from PersonInAERole Where UID_Person = '%useruid%' and UID_AERole = 'AOB-AEROLE-ADMIN'))
    OR
    (uid_person in ( select uid_person from QER_VEditEmployee where uid_personhead = '%useruid%'))

Children