Advertisement
roganhamby

DCL EDS Load

Nov 11th, 2015
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Right now DCL just wants their own materials.  Also include non-copy holding records that have 856s that have their designator.  
  3.  
  4. In the future it could have holdable materials by other library systems. For that check to see if they are holdable and outside age protection.  But, that'll be after the new year.
  5. */
  6.  
  7. select distinct bre.id
  8. from asset.copy ac
  9. join asset.call_number acn on acn.id = ac.call_number
  10. join biblio.record_entry bre on bre.id = acn.record
  11. join actor.org_unit aou on aou.id = ac.circ_lib
  12. join config.bib_source b on b.id = bre.source
  13. where aou.shortname ilike 'dcl%' and ac.deleted = false and bre.deleted = false and b.can_have_copies = true
  14. UNION ALL
  15. select distinct bre.id
  16. from biblio.record_entry bre
  17. join metabib.real_full_rec rfr on rfr.record = bre.id
  18. join config.bib_source b on b.id = bre.source
  19. where rfr.subfield = '9' and rfr.tag = '856' and rfr.value ilike 'dcl' and b.can_have_copies = false
  20. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement