User Tools

Site Tools


evergreen-reports:sql:item

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
evergreen-reports:sql:item [2015/06/12 11:20] roganhevergreen-reports:sql:item [2022/02/10 13:34] (current) – external edit 127.0.0.1
Line 76: Line 76:
   GROUP BY aou.shortname, circ_modifier   GROUP BY aou.shortname, circ_modifier
   ORDER BY aou.shortname, ac.circ_modifier;   ORDER BY aou.shortname, ac.circ_modifier;
 +</code>
 +
 +
 +==== Sample Item Barcode from each Circulation Modifier and Org Unit ====
 +
 +**Submission Notes:**
 +This report was submitted on 6/12/2015 by Rogan Hamby of SC LENDS. It was created by Rogan Hamby.
 +
 +**Version**:  Evergreen 2.1, 2.5, 2.7
 +
 +**Data Sources Used**:  
 +
 +**Running Tips/Guidelines**:  This is for testing in library consortiums / systems where you need items from different org units for testing org unit level rules. It additional requires that the items be available and not deleted.  You do not need to change anything in this report to run it.
 +
 +<code sql>
 +
 +SELECT DISTINCT ON (ac.circ_modifier, paou.shortname) ac.barcode, ac.id AS "item id", ac.circ_modifier, aou.id AS "org id", aou.shortname
 +FROM asset.COPY ac
 +JOIN asset.copy_location acl ON acl.id = ac.LOCATION
 +JOIN actor.org_unit aou ON aou.id = ac.circ_lib
 +JOIN actor.org_unit paou ON paou.id = aou.parent_ou
 +WHERE ac.deleted = FALSE AND ac.status IN (0,7) AND ac.circulate = TRUE AND acl.circulate = TRUE AND aou.ou_type = 3
 +UNION ALL
 +SELECT DISTINCT ON (ac.circ_modifier, paou.shortname) ac.barcode, ac.id AS "item id", ac.circ_modifier, aou.id AS "org id", aou.shortname
 +FROM asset.COPY ac
 +JOIN asset.copy_location acl ON acl.id = ac.LOCATION
 +JOIN actor.org_unit aou ON aou.id = ac.circ_lib
 +JOIN actor.org_unit paou ON paou.id = aou.parent_ou
 +WHERE ac.deleted = FALSE AND ac.status IN (0,7) AND ac.circulate = TRUE AND acl.circulate = TRUE AND aou.ou_type = 5
 +;
 </code> </code>
  
Line 117: Line 147:
  
 Back to [[evergreen-reports:sql|Evergreen SQL Report Submissions]] main page Back to [[evergreen-reports:sql|Evergreen SQL Report Submissions]] main page
- 
evergreen-reports/sql/item.1434122435.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.