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

User Import Failure - Subquery returns more than one row

NID27
Regular Contributor
Regular Contributor

Hello,

The user import is failing with the error: Subquery returns more than one row

In the logs I see below query under modifyuserdata jason is failing:

"UPDATE NEWUSERDATA as NU SET NU.CUSTOMPROPERTY39 =(select A.accountid from CURRENTACCOUNTS A  WHERE A.CUSTOMPROPERTY22=NU.customproperty11 and status = '1')",

Complete Modify userdata json is attached

How do I identify which user is causing the issue?

Thanks

Nidhi Sharma

 

6 REPLIES 6

NM
Honored Contributor II
Honored Contributor II

Hi @NID27 , is this a new query that you are planning to add or import started failing recently?

NID27
Regular Contributor
Regular Contributor

No... That is an existing query. and the import started failing recently

NM
Honored Contributor II
Honored Contributor II

Share logs to debug the issue.

"UPDATE NEWUSERDATA as NU SET NU.CUSTOMPROPERTY39 =(select group_concat(A.accountid)from CURRENTACCOUNTS A  WHERE A.CUSTOMPROPERTY22=NU.customproperty11 and endpointkey=1 and status = '1')",


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

NM
Honored Contributor II
Honored Contributor II

Try this 

UPDATE NEWUSERDATA as NU SET NU.CUSTOMPROPERTY39 =(select A.accountid from CURRENTACCOUNTS A WHERE A.CUSTOMPROPERTY22=NU.customproperty11 and status = '1' limit 1)",

PremMahadikar
All-Star
All-Star

Hi @NID27 , 

Q. How do I identify which user is causing the issue?

Perform the select query like below and check if there are any entries. (If you know user from the import, you can join the tables and find right user accounts)

select a.name, a.CUSTOMPROPERTY22 from accounts a where a.name in (select a1.CUSTOMPROPERTY22 from accounts a1 group by a1.CUSTOMPROPERTY22 having count(*) > 1)
  • Once you identify duplicate entries,
    • make sure to add more filters in your update query like by adding endpoint or something which get single entry.
    • or delete the data from duplicates
  • Update query: "UPDATE NEWUSERDATA as NU SET NU.CUSTOMPROPERTY39 =(select A.accountid from CURRENTACCOUNTS A  WHERE A.CUSTOMPROPERTY22=NU.customproperty11 and status = '1' and endpointkey=XY)",

My guess, multiple entry is due to Mutiple accounts for different endpoints.

 

If this helps, please consider selecting Accept As Solution and hit Kudos