Advertisement
Guest User

dyrcona

a guest
Apr 9th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. select patronorg.shortname "patron home",circorg.shortname "circ org",copyorg.shortname "copy org",callorg.shortname "call number org",ac.id,ac.usr,mmbxs.balance_owed from action.circulation ac,
  2. money.materialized_billable_xact_summary mmbxs,
  3. actor.usr au,
  4. actor.org_unit circorg,
  5. actor.org_unit patronorg,
  6. actor.org_unit copyorg,
  7. actor.org_unit callorg,
  8. asset.copy acopy,
  9. asset.call_number acn
  10. where
  11. ac.id=mmbxs.id and
  12. au.id=ac.usr and
  13. circorg.id=ac.circ_lib and
  14. patronorg.id=au.home_ou and
  15. copyorg.id=acopy.circ_lib and
  16. callorg.id=acn.owning_lib and
  17. acopy.id=ac.target_copy and
  18. acn.id=acopy.call_number and
  19.  
  20. mmbxs.usr in(select id from actor.usr where home_ou in
  21. (
  22. 114
  23. )) and balance_owed>0
  24. order by circorg.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement