Opened 22 months ago

Last modified 22 months ago

#3048 accepted defect

Correct Data Errors in Production

Reported by: Benjamin Haag Owned by: Benjamin Haag
Priority: medium Milestone:
Component: Database, Data Updates Version: N/A
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description (last modified by Benjamin Haag)

Overview

Below are two queries that identify erroneous data currently in production (compiled by Kurt Endress).

Steps

1) Run queries indicated below.
2) Notify cooperator record owners of issue(s).

1) Accessions without any inventory record

-- ST query

WHERE NOT EXISTS (SELECT * FROM inventory WHERE accession_id = accession.accession_id)

-- SQL

SELECT CONCAT(accession_number_part1, ' ', accession_number_part2, ' '+accession_number_part3) AS accession

FROM accession a

WHERE NOT EXISTS (SELECT * FROM inventory WHERE accession_id = a.accession_id)\

dup 2

dup 5

dup 6

NA 58798

NA 58800

NA 62072

NA 80457

NA 80465

NA 87732

NA 87733

PI 401753

PI 495635

PI 705164

WLP 868

2) Recent order final requestors without a country.

-- ST query

@cooperator.geography_id IS NULL

AND @cooperator.cooperator_id IN (SELECT DISTINCT final_recipient_cooperator_id FROM order_request WHERE created_date > '2020')


-- SQL

SELECT cooperator_id, first_name, last_name, organization, city

, (SELECT CONCAT(first_name, ' ', last_name) FROM cooperator WHERE cooperator_id = c.owned_by) AS owner

FROM cooperator c

WHERE geography_id IS NULL

AND cooperator_id IN (SELECT DISTINCT final_recipient_cooperator_id FROM order_request WHERE created_date > '2020')


See attached spreadsheet for cooperator list.

Attachments (1)

Trac_3048.xlsx​ (12.8 KB ) - added by Benjamin Haag 22 months ago.
List of cooperators to be updated.

Download all attachments as: .zip

Change History (5)

comment:1 by Benjamin Haag, 22 months ago

Description: modified (diff)

comment:2 by Benjamin Haag, 22 months ago

Description: modified (diff)

comment:3 by Benjamin Haag, 22 months ago

Description: modified (diff)

by Benjamin Haag, 22 months ago

Attachment: Trac_3048.xlsx​ added

List of cooperators to be updated.

comment:4 by Benjamin Haag, 22 months ago

Description: modified (diff)
Status: assigned → accepted
Note: See TracTickets for help on using tickets.