Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    SQL showing number of items for each sublibrary/collection combination


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




    We need to know how many items there are for each sublibrary/collection combination.




    The following SQL script will do that:

    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 items-count.lst

    select /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ z30_sub_library, z30_collection, count(*) from z30 group by z30_sub_library, z30_collection order by z30_sub_library, z30_collection  asc;

    spool off



    • Article last edited: 16-Mar-2016
    • Was this article helpful?