Duplicate Cases

Discussions about editing and cleaning data
Post Reply
etuser
Posts: 36
Joined: September 3rd, 2019, 5:57 am

Duplicate Cases

Post by etuser » March 23rd, 2021, 7:41 am

Dear Cspro Team,

I use the Set access() with forcase command to display duplicates as indicated in one of this forum responses . I have used the main dictionary as an external dictionary for menu program to do that, but what it displayed is lots of cases even cases that are not in the data set. Is the set access consider deleted data too ? or have a problem using the main data as an external dictionary ?

with regards

Gregory Martin
Posts: 1418
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Duplicate Cases

Post by Gregory Martin » March 23rd, 2021, 8:00 am

What command are you using? This is from the helps: https://www.csprousers.org/help/CSPro/s ... ement.html

CaseStatus.All - Iterate through all cases, including deleted cases
CaseStatus.NotDeleted - Iterate through all non-deleted cases (default)
CaseStatus.Partial - Iterate through non-deleted partially saved cases
CaseStatus.Duplicate - Iterate through non-deleted cases where there are at least two cases with the same key in the file

Are you using CaseStatus.All instead of CaseStatus.Duplicate?

etuser
Posts: 36
Joined: September 3rd, 2019, 5:57 am

Re: Duplicate Cases

Post by etuser » March 23rd, 2021, 9:01 am

Dear Greg,

Thank you for your prompt response. Actually I used the "duplicate" but when I tried just now to pass the data with empty batch program and have the new data out of it , it works with the new data but with the original data it has problem, I don't know why ?

Many Thanks.

Gregory Martin
Posts: 1418
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Duplicate Cases

Post by Gregory Martin » March 23rd, 2021, 1:06 pm

If the original data never works and you can share the file, you can send it to cspro@lists.census.gov and we can see if we can recreate the problem.

In case anyone is interested, the SQLite query that is executed to get duplicate cases follows:
( SELECT `cases`.`key` FROM `cases` WHERE `cases`.`deleted` = 0 GROUP BY `cases`.`key` HAVING COUNT(*) > 1 )

Post Reply