﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	db_engine	os_version
1192	Code MTA-AZB missing from ACCESSION_RESTRICTION_TYPE group	Mark J. Millard	dbmuqs	"The code MTA-AZB is missing from the ACCESSION_RESTRICTION_TYPE group.  Either the data needs to be changed to use another code or the code needs to be added to the code table.  The records involved can be found by bringing up the IPR form and typing this into the search box:

@accession_ipr.type_code = 'MTA-AZB'

The SQL to find any missing codes in this group is:

SELECT accession_ipr.type_code, last_name, COUNT(accession_ipr.type_code) reccount FROM accession_ipr JOIN cooperator on cooperator.cooperator_id = accession_ipr.owned_by WHERE accession_ipr.type_code NOT IN (SELECT value FROM code_value WHERE group_name = 'ACCESSION_RESTRICTION_TYPE') GROUP BY accession_ipr.type_code, last_name ORDER BY accession_ipr.type_code, last_name

Here is a table breaking down the records by owner:

type_code	last_name	reccount
MTA-AZB	Carstens	5
MTA-AZB	Conrad	108
MTA-AZB	DeBuse	123
MTA-AZB	Dellefave	1
MTA-AZB	Hummer	4
MTA-AZB	King	2
MTA-AZB	Krueger	1
MTA-AZB	Postman	6
MTA-AZB	Prins	60
MTA-AZB	Reed	3
MTA-AZB	Smith	203
"	defect	closed	critical	Post-NPGS Prod'n	Database, Custom Reports	1.9.4 Server		fixed	codes	lisa.burke@…	SQL Server	Windows 7 Ultimate 64 bit
