Advertisement
Guest User

bookbag query #2

a guest
Sep 15th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.16 KB | None | 0 0
  1. SELECT "ccs".id AS "status_code",
  2. oils_i18n_xlate('config.copy_status', 'ccs', 'name', 'id', "ccs".id::TEXT, 'en-US') AS "copy_status",
  3. "ccs".holdable AS "status_holdable",
  4. "acn".label AS "call_number_label",
  5. "acn".id AS "call_number",
  6. "acn".owning_lib AS "call_number_owning_lib",
  7. "acns".label AS "call_number_suffix_label",
  8. "acns".id AS "call_number_suffix",
  9. "bmp".label AS "part_label",
  10. oils_i18n_xlate('asset.copy_location', 'acpl', 'name', 'id', "acpl".id::TEXT, 'en-US') AS "copy_location",
  11. "acpl".holdable AS "location_holdable",
  12. "acnp".label AS "call_number_prefix_label",
  13. "acnp".id AS "call_number_prefix",
  14. "circ".due_date AS "due_date",
  15. "acp".id AS "id",
  16. "acp".barcode AS "barcode",
  17. "acp".circ_lib AS "circ_lib",
  18. "acp".create_date AS "create_date",
  19. "acp".active_date AS "active_date",
  20. "acp".age_protect AS "age_protect",
  21. "acp".holdable AS "holdable",
  22. "acp".copy_number AS "copy_number"
  23. FROM ( asset.copy AS "acp"
  24. INNER JOIN asset.call_number AS "acn" ON ( "acn".id = "acp".call_number AND ( "acn".deleted = 'f' ) AND ( "acn".record = '109974144' ) ) )
  25. INNER JOIN asset.copy_location AS "acpl" ON ( "acpl".id = "acp".location AND "acpl".opac_visible = 't' AND "acpl".deleted = 'f' )
  26. INNER JOIN config.copy_status AS "ccs" ON ( "ccs".id = "acp".STATUS AND "ccs".opac_visible = 't' )
  27. LEFT JOIN asset.copy_part_map AS "acpm" ON ( "acpm".target_copy = "acp".id )
  28. LEFT JOIN biblio.monograph_part AS "bmp" ON ( "bmp".id = "acpm".part )
  29. INNER JOIN actor.org_unit AS "aou" ON ( "aou".id = "acp".circ_lib AND "aou".id IN (SELECT (actor.org_unit_descendants("aou".id,'0' ))."id" AS "id" FROM actor.org_unit AS "aou" WHERE "aou".id = 487) )
  30. LEFT JOIN action.circulation AS "circ" ON ( "circ".target_copy = "acp".id AND "circ".checkin_time IS NULL )
  31. INNER JOIN asset.call_number_suffix AS "acns" ON ( "acns".id = "acn".suffix )
  32. INNER JOIN asset.call_number_prefix AS "acnp" ON ( "acnp".id = "acn".prefix )
  33. WHERE ( "acp".opac_visible = 't' AND "acp".deleted = 'f' )
  34. AND ( "aou".opac_visible = 't' )
  35. ORDER BY evergreen.rank_ou("aou".id,'487','487' ), "aou".name, "acn".label_sortkey, "acp".copy_number, "acp".barcode, evergreen.rank_cp_status("acp".STATUS )
  36. LIMIT 6 OFFSET 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement