Question

Account duplicate search - using SQL

Hi, I am trying to get the duplicate accounts list from SQL query. Because I couldn't export from the Creatio duplicate search page.

 

I am using the below query

 

select a.Name, count(*) from Account a

group by a.Name

having count(*)>1

 

How do I get the id, ownerid, countryid etc ?

If I add other columns or joins, it doesn't work

 

thanks,

Selva

 

Like 0

Like

4 comments

Selva,



As Id is the unique column for the account table.

It's not possible to get the duplicates using the ID of the account.



There should be another field that is a primary field for the account table than the Creatio OOTB ID field, need to use that field and there are chances that the Name field is a text field and can be the same for two accounts.





BR,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

Thanks Mate!

Hello!



You can create a stored procedure to perform a duplicate search and count the number of records. This algorithm is identical to the previous deduplication mechanism:

1. Create a stored procedure that finds duplicates and adds them to the deduplicate result table( for example, the [tsp_FindAccountDuplicate] procedure finds similar records and adds them to the [AccountDuplicateSearchResult] table)

2. Count the number of records in the duplicate result table (e.g., select * from [AccountDuplicateSearchResult]).

Alona Dolya,

Yes. I did the same. I executed the sp and was able to get the duplicate account IDs from the table 

[AccountDuplicateSearchResult] 

 

Thank you!

Show all comments