Skip to main content
ExLibris Dev

Count of items or titles by collection


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



How can we get a count of the number of A) items or B) titles for each collection?


A) To get a count of the number of items for each collection:
> s+ xxx50
SQL> select z30_sub_library, z30_collection, count(*) from z30 group by z30_sub_library, z30_collection;


B) To get a count of collections by bib/hol record: 

1. Build USER-DEF-n fields in the xxx60 tab22 to generate z13u table entries.  For example:
  USER-DEF-1 1 852## b
  USER-DEF-1 1 852## c


2.  Run manage-07 for xxx60; 


3. Create a script collection_count.sql:
set echo off
set pause off
set term off
set show off
set verify off
set heading off
set feed off
spool collection_count.lst
select z13u_user_defined_1, z13u_user_defined_2, count(*) from z13u group by z13u_user_defined_1, z13u_user_defined_2;
spool off

> s+ xxx60
SQL>  @collection_count.sql


  • Article last edited: 25-Mar-2016
// feedback widged