Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Does (SELECT LPAD(COUNT(*) + 1, 6, '0') FROM CURRENTUSERS) work if users created in bulk?

vivekrajan1
New Contributor III
New Contributor III

Hi All,

Does the below condition work if Users were created in Bulk fashion?, lets say 8 users onboarded into EIC in single a UserImport, does it increment 1 by 1?

(SELECT LPAD(COUNT(*) + 1, 6, '0') FROM CURRENTUSERS)

[This post has been edited by a Moderator to move to its own thread.]

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

You can validate let us know if you face issue.. with new thread


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak ,

I validated it using below query,

lets say, User Count(*) = 01000,

Next, 5 users onboarded in a UserImport, now CP15 becomes 01001 to all the 5 onboarded users(My guess is because Count(*) is still 01000)

 Next, USER COUNT(*) becomes 1005, On the Next userimport, lets say 1 user gets onboarded, then CP15 becomes 01006

"UPDATE NEWUSERDATA SET newuserdata.customproperty15 = (SELECT LPAD(COUNT(*)+ 1, 5, '0') FROM CURRENTUSERS)"

Please share logs


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Honored Contributor III
Honored Contributor III

@vivekrajan1 try this s

UPDATE NEWUSERDATA SET newuserdata.customproperty15 = (SELECT LPAD((select count(*) from currentusers) + (select count(customproperty15) from newuserdata)+ 1, 5, '0'))"