Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT "circ".due_date AS "due_date",
- "circ".circ_lib AS "circ_circ_lib",
- "acn".label AS "call_number_label",
- "acn".id AS "call_number",
- "acn".owning_lib AS "call_number_owning_lib",
- "ccs".id AS "status_code",
- oils_i18n_xlate('config.copy_status', 'ccs', 'name', 'id', "ccs".id::TEXT, 'en-US') AS "copy_status",
- "ccs".holdable AS "status_holdable",
- "ccs".is_available AS "is_available",
- oils_i18n_xlate('asset.copy_location', 'acpl', 'name', 'id', "acpl".id::TEXT, 'en-US') AS "copy_location",
- "acpl".holdable AS "location_holdable",
- "acpl".url AS "location_url",
- "acp".id AS "id",
- "acp".barcode AS "barcode",
- "acp".circ_lib AS "circ_lib",
- "acp".create_date AS "create_date",
- "acp".active_date AS "active_date",
- "acp".age_protect AS "age_protect",
- "acp".holdable AS "holdable",
- "acp".copy_number AS "copy_number",
- "acp".circ_modifier AS "circ_modifier",
- "acns".label AS "call_number_suffix_label",
- "acns".id AS "call_number_suffix",
- "acnp".label AS "call_number_prefix_label",
- "acnp".id AS "call_number_prefix",
- "crahp".name AS "age_protect_label",
- "bmp".label AS "part_label",
- "erfcc".circ_count AS "circ_count"
- FROM asset.copy AS "acp"
- INNER JOIN asset.call_number AS "acn" ON ("acn".id = "acp".call_number
- AND ("acn".deleted = 'f')
- AND ("acn".record = 248))
- INNER JOIN asset.call_number_prefix AS "acnp" ON ("acnp".id = "acn".prefix)
- INNER JOIN asset.call_number_suffix AS "acns" ON ("acns".id = "acn".suffix)
- 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 = 1))
- LEFT JOIN action.circulation AS "circ" ON ("circ".target_copy = "acp".id
- AND "circ".checkin_time IS NULL)
- INNER JOIN asset.copy_location AS "acpl" ON ("acpl".id = "acp".location
- AND "acpl".deleted = 'f')
- INNER JOIN config.copy_status AS "ccs" ON ("ccs".id = "acp".status)
- LEFT JOIN asset.copy_part_map AS "acpm" ON ("acpm".target_copy = "acp".id)
- LEFT JOIN biblio.monograph_part AS "bmp" ON ("bmp".id = "acpm".part
- AND "bmp".deleted = 'f')
- LEFT JOIN config.rule_age_hold_protect AS "crahp" ON ("crahp".id = "acp".age_protect)
- INNER JOIN extend_reporter.full_circ_count AS "erfcc" ON ("erfcc".id = "acp".id)
- WHERE ("acp".deleted = 'f')
- ORDER BY evergreen.rank_ou("aou".id, '1', NULL),
- "aou".shortname,
- "acn".label_sortkey,
- "acns".label_sortkey,
- "bmp".label_sortkey,
- "acp".copy_number,
- "acp".barcode,
- evergreen.rank_cp("acp".id)
- LIMIT 100
- OFFSET 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement