Hello!
I need to run a report of events for staff that includes the group they are in.
The problem I am having is both groups and staff are listed in the egw_accounts table
If I use this:
SELECT egw_accounts.account_lid,
egw_accounts.account_primary_group,
egw_cal.cal_referral_type,
egw_cal.cal_created
FROM egw_accounts,
egw_cal
WHERE egw_accounts.account_id = egw_cal.cal_owner
AND egw_accounts.account_type = 'u’
ORDER BY egw_cal.cal_referral_type ASC
I can get each staff, events scheduled by them and the ID of the group they are assigned to.
I cannot figure out how to get the account_lid for ease of reading. Say group “north” has account_primary_group of 1; group “south” has account_primary_group of 2; etc.
I would like the report to reflect north and south instead of 1 and 2 by using the accounts.account.lid to identify the group and not the account_primary_group which is an integer
Is there a way to do this?
Thanks so much for any input