Opened 6 years ago
Closed 5 years ago
#2287 closed defect (fixed)
Update 'description_code' field for the accession_inv_attach records to use the accepted code_value entries for the 'ATTACH_DESCRIPTION_CODE' code group.
| Reported by: | Lisa Burke | Owned by: | Benjamin Haag |
|---|---|---|---|
| Priority: | medium | Milestone: | |
| Component: | Database, Data Updates | Version: | N/A |
| Severity: | Keywords: | Attach Description Code | |
| Cc: | Database Engine: | N/A | |
| Operating System: | N/A |
Description
Update 'description_code' field for the accession_inv_attach records to use the accepted code_value entries for the 'ATTACH_DESCRIPTION_CODE' code group.
Change History (4)
comment:1 by , 6 years ago
| Type: | enhancement → defect |
|---|
comment:2 by , 6 years ago
| Component: | Database, Schema Changes → Database, Data Updates |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 5 years ago
Ran the following SQL on production:
UPDATE accession_inv_attach
SET description_code = UPPER(description_code),
modified_by = 48,
modified_date = GETDATE()
comment:4 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

As I understand it the case of the description code needs to match the case of the code value. It's a little tricky to check for case differences as the database is case insensitive. Ideally the PW would be written case insensitive as well.
This SQL will find the ones that differ just on case.
SELECT aia.description_code, cv.value
FROM accession_inv_attach aia
JOIN code_value cv ON cv.value = aia.description_code AND cv.group_name = 'ATTACH_DESCRIPTION_CODE'
WHERE cv.value != aia.description_code COLLATE Latin1_General_CS_AS