Advertisement
roganhamby

Simple Report of Items by Status / Easily Adaptable

Sep 28th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- report of items by status
  2. -- 14 is damaged
  3. -- select * from config.copy_status; to see more
  4.  
  5. -- this can be easily adapted to see other information such as reports by call number, etc...
  6.  
  7.  
  8. select aou.shortname AS "Branch", ac.barcode AS "Barcode", acn.label AS "Call Number", acl.name AS "Copy Location", rmsr.title AS "Title", rmsr.author AS "Author"
  9. from asset.copy ac
  10. join asset.call_number acn ON acn.id = ac.call_number
  11. join reporter.materialized_simple_record rmsr ON rmsr.id = acn.record
  12. join asset.copy_location acl on acl.id = ac.location
  13. join actor.org_unit aou ON aou.id = ac.circ_lib
  14. join actor.org_unit aou2 on aou2.id = aou.parent_ou
  15. where ac.status = 14 and aou2.shortname = 'YCL' and ac.deleted = FALSE
  16. order by aou.shortname, acl.name, acn.label
  17. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement