Opened 11 years ago
Closed 11 years ago
#1193 closed defect (fixed)
Consider making VIR code VIRUS in INVENTORY_AVAILABILITY_STATUS group
| Reported by: | Mark J. Millard | Owned by: | dbmuqs |
|---|---|---|---|
| Priority: | critical | Milestone: | Post-NPGS Prod'n |
| Component: | Database, Custom Reports | Version: | 1.9.4 Server |
| Severity: | Keywords: | codes | |
| Cc: | Joseph.Postman@…, lisa.burke@… | Database Engine: | N/A |
| Operating System: | N/A |
Description
There is a code VIR indicating Virus Infected in GRIN-Global npgsWEB Inventory Availability Status field, however there are no inventory records using it. Instead there are 75 records for Corvallis using this code and it is not in the code table. Consider changing the code from VIR to VIRUS.
Use these two queries with the inventory dataview in the Search Tool to find these records:
@inventory.availability_status_code = 'VIRUS'
@inventory.availability_status_code = 'VIR'
The SQL used to find the missing VIRUS code is:
SELECT inventory.availability_status_code, last_name, COUNT(inventory.availability_status_code) reccount FROM inventory JOIN cooperator on cooperator.cooperator_id = inventory.owned_by WHERE inventory.availability_status_code NOT IN (SELECT value FROM code_value WHERE group_name = 'INVENTORY_AVAILABILITY_STATUS') GROUP BY inventory.availability_status_code, last_name ORDER BY inventory.availability_status_code, last_name
