Ad-hoc Query: Protocols with NIHGrantContractType ------------------------------------------------- Old Version =========== select q.doc_id, q.value FROM query_Term q, docs_with_pub_status d WHERE q.doc_id=d.doc_id AND q.path = '/InScopeProtocol/FundingInfo/NIHGrantContract/GrantContractNo' AND d.pv='Y' order by q.doc_id New Version =========== SELECT q.doc_id, q.value FROM query_term q JOIN docs_with_pub_status d ON d.doc_id = q.doc_id AND d.pv = 'Y' WHERE q.path = '/InScopeProtocol/FundingInfo' + '/NIHGrantContract/GrantContractNo' OR q.path = '/CTGovProtocol/PDQAdminInfo' + '/FundingInfo' + '/NIHGrantContract/GrantContractNo' ORDER BY q.doc_id