How to check if the system user with the name "John" already exists in IRIS via SQL?
Hi Folks!
Have a very simple question, I hope :)
How can I make sure that user 'John' is already created in the IRIS system?
Preferabbly via SQL?
thanks a lot!
Product version: IRIS 2024.3
Discussion (0)0
Comments
name($Username) or fullname?
some form of
select name,Fullname from security.Users
with the appropriate where clause would work, albeit it has to be run in %SYS.
Thank you, @Stephen Canzano !
Additionally, non SQL, there is a built in function for this of
if##class(Security.Users).Exists("John") {
// user exists
}which confirms if the IRIS user exists using the users username (here, assuming username of John). Documentation on the Security.Users docs page.
Works like a charm! Thank you @Hannah Sullivan !