Skip to content

Instantly share code, notes, and snippets.

@rayvoelker
Created September 21, 2016 14:11
Show Gist options
  • Save rayvoelker/aabc6adc4d1d822069917e4d917b6e7b to your computer and use it in GitHub Desktop.
Save rayvoelker/aabc6adc4d1d822069917e4d917b6e7b to your computer and use it in GitHub Desktop.
SELECT
-- put your url prefix here
'http://flyers.udayton.edu/record=' || id2reckey(record_id) || 'a' AS link,
id2reckey(record_id) || 'a' as bib_record_num,
index_entry as control_number
FROM
sierra_view.phrase_entry
WHERE
index_tag = 'o' AND
index_entry IN (
SELECT
index_entry
FROM
sierra_view.phrase_entry
WHERE
index_tag = 'o'
GROUP BY
index_entry
HAVING
count(id) > 1
)
ORDER BY
control_number, bib_record_num
@rayvoelker
Copy link
Author

finds bib records in the system that have the same control number as other bib records in the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment