Ahoi
this one should fit your needs:
select a.OH_Client as "Client", a.OH_NAME as "User Name", USR_FIRSTNAME, USR_LASTNAME, USR_EMAIL1,b.OH_Name as "USRG Name" from OH a, oh b, USRG, USR
where a.OH_IDNR = USR_OH_IDNR
and a.OH_CLIENT not in (0)
and b.OH_CLIENT not in (0)
and a.OH_IDNR = USRG_USR_Idnr
and b.OH_Idnr = USRG_USG_Idnr
and a.OH_DELETEFLAG = 0
and b.OH_DELETEFLAG = 0
order by 1,3;
cheers, Wolfgang
------------------------------
I know I do really know it!
------------------------------
Original Message:
Sent: 09-04-2019 07:26 AM
From: Andre Eymann
Subject: SQLI query to show users with groups
Hello Community,
i would like to write an SQLI query that shows all users (including FirstName and LastName) and their groups.
"Show all users" would be like:
select USR.USR_FirstName, USR.USR_LastName, USR.USR_EMail1
from USR
order by USR_LastName
But how can i show the groups of the users too?
Can anybody help please?
Kind regards
Andre