Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph
    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. List of titles which have been checked out, showing number of loans

    List of titles which have been checked out, showing number of loans

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Description
    2. Resolution

     

    • Product: Aleph
    • Product Version: 20, 21, 22, 23
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care

     

    Description

    We would like a list of titles that have been checked out, showing how many times each has been checked out.

    Resolution

    The following, using the z30_loan_no column, shows how many times each item has been checked out. (Change each "xxx50" to your ADM library and each "xxx01" to your bib library.)

    s+ xxx50;
    SQL-XXX50> SELECT /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ Z13_TITLE, z30_rec_key, z30_rec_key, z30_no_loans  from xxx01.Z13, Z30, Z103 where z30_no_loans ^= '0' and Z13_REC_KEY = substr (Z103_REC_KEY_1,6,9) and substr (Z103_REC_KEY_1,1,5) = 'xxx01' and substr (Z103_REC_KEY,6,9) = substr (Z30_REC_KEY,1,9) order by z30_no_loans desc;

    Note that the z30_no_loans has a maximum of "999".  See the article " Does Aleph have a limit on the number of loans that show on the item record? "  in this regard.

    **More**

    Below is a "loan-count.sql" report which was created for a particular case.  It is based on a call number range.

    set echo off
    set pause off
    set term off
    set show off
    set feed off
    set verify off
    set heading off
    set pagesize 58

    spool loan-count.lst

    SELECT /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ z30_no_loans from xxx01.Z13, Z30, Z103 where
    Z13_REC_KEY = substr (Z103_REC_KEY_1,6,9) and
    substr (Z103_REC_KEY_1,1,5) = 'xxx01' and
    substr (Z103_REC_KEY,6,9) = substr (Z30_REC_KEY,1,9) and
    z30_collection = 'XXXXX' and
    z30_call_no like '$$hTR%'
    order by z30_call_no asc;

    spool off
    exit

    <end loan-count.sql report>

    In this case, we included all call numbers beginning with $$hTR%. If you want to exclude items which have zero loans, you could add the following to the "where" clause: 

     and z30_no_loans ^= '0' 

    You could change the "order by" to z30_barcode, "count (*)", or any other field in the "SELECT". 

    To execute the script you do: 

    > s+ xxx50 
    xxx50@ALEPH21> @loan-count.sql 

     


    • Article last edited: 14-Oct-2018
    View article in the Exlibris Knowledge Center
    1. Back to top
      • List of serials subscriptions, with ISSN numbers
      • List of users with overdue items which have received 3 or more notices
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. contype:kba
      2. Prod:Aleph
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved