Duplicate Cases

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
etuser
Posts: 85
Joined: September 3rd, 2019, 5:57 am

Duplicate Cases

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Duplicate Cases

Post 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?
etuser
Posts: 85
Joined: September 3rd, 2019, 5:57 am

Re: Duplicate Cases

Post 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.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Duplicate Cases

Post 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 )
Post Reply