Page 1 of 1

Duplicate Cases

Posted: March 23rd, 2021, 7:41 am
by etuser
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

Re: Duplicate Cases

Posted: March 23rd, 2021, 8:00 am
by Gregory Martin
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?

Re: Duplicate Cases

Posted: March 23rd, 2021, 9:01 am
by etuser
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.

Re: Duplicate Cases

Posted: March 23rd, 2021, 1:06 pm
by Gregory Martin
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 )