Item Find Tool SQL for circulating item records based on bad page number data

This was discussed during the July 2024 Polaris Zoom cataloging forum. One way we’ve found to find materials that are circulating but don’t yet have a full bib is to look for certain patterns in the 300 fields.

Copy and Paste this SQL into the Item Find Tool if you’d like to use this in your organization.

select distinct ir.ItemRecordID
from polaris.polaris.BibliographicTagsAndSubfields_View bts
join polaris.polaris.BibliographicRecords br
	on br.BibliographicRecordID = bts.BibliographicRecordID
join polaris.polaris.ItemRecords ir
	on ir.AssociatedBibRecordID = bts.BibliographicRecordID
where 
(
	(
		bts.TagNumber = 300
		and bts.Subfield = 'a'
		and bts.Data like 'pages%cm%'
	)
	or 
	(
		bts.TagNumber = 300
		and bts.Subfield = 'c'
		and bts.Data like 'cm%'
		and bts.BibliographicRecordID in (select bts2.BibliographicRecordID
			from polaris.polaris.BibliographicTagsAndSubfields_View bts2
			where bts2.TagNumber = 300
				and bts2.Subfield = 'a'
				and bts2.Data like 'pages%;%')
	)
)
	and br.RecordStatusID != 4 --exclude deleted bibs
	and ir.RecordStatusID != 4 --exclude deleted items
	and ir.ItemStatusID not in (13, 15) --exclude on-order or processing

I am getting blank results. Any ideas?

This is an ITEM search, if you switch to looking for item records, my guess is you’ll see 28 results.

Change the select to:

Select bts.BibliographicRecordID

You may need to limit the results by adding Select top 10 or some number.

Select top 10 bts.BibliographicRecordID

I’m not a Polaris guy, but the criteria look pretty light on the item record side of the query to call these “circulating” item records. I guess it depends on how one defines “circulating”.

I’ll ask the catalogers here if they concur on the 300 field being indicative of an incomplete bib and if so, adapt it for our Sierra environment. Thanks for sharing!

1 Like

Thanks, Carl! That worked! Now we just have over 29k records to update…

1 Like

Just to clarify, we’re in a consortium which is why we selected to do this at the item level search, so they libraries who are circulating the items would be the ones responsible for going in and updating the bibs.