Skip to content

Instantly share code, notes, and snippets.

@jeff
Created March 23, 2015 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeff/377e78b62f8aefcc3a7c to your computer and use it in GitHub Desktop.
Save jeff/377e78b62f8aefcc3a7c to your computer and use it in GitHub Desktop.
-- [query making use of asset.copy acn]
and NOT EXISTS (
SELECT 1
FROM asset.call_number acnsub
-- on the following line, "label" is interpreted as "acnsub.label" unless you use an explicit "acn.label"
WHERE acnsub.label = regexp_replace(label, '^JPB BLUE (.*)', 'J FIC \1')
AND acnsub.owning_lib = acn.owning_lib
AND acnsub.record = acn.record
AND not acnsub.deleted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment