[Building Sakai] Culling duplicates from SAM_ITEMGRADING_T

Joshua Swink joshua.swink at gmail.com
Thu Mar 21 14:05:03 PDT 2013


I'll need to remove duplicates from the SAM_ITEMGRADING_T table for our
upgrade to Sakai 2.9.1. I'm using a script found at
https://jira.sakaiproject.org/browse/SAM-775(sam_clean_duplicate_responses.plsql),
but this script doesn't remove
duplicates when there are multiple duplicates with SUBMITTEDDATE not null.

Does anyone have advice on how to remove those duplicates as well?

The script does include a commented-out statement for those particular
entries:

 delete from sam_itemgrading_t where itemgradingid in (
        select MIN(g.itemgradingid) from sam_itemgrading_t g where
        g.agentid = r.agentid and
        g.publisheditemid = r.publisheditemid and
        g.assessmentgradingid = r.assessmentgradingid and
        g.publisheditemtextid = r.publisheditemtextid
        GROUP BY g.PUBLISHEDITEMID, g.AGENTID, g.ASSESSMENTGRADINGID,
g.PUBLISHEDITEMTEXTID

This seems pretty reasonable, to delete the earliest submission.

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130321/fd68c9c3/attachment.html 


More information about the sakai-dev mailing list