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. SQL report of bib records linked to multiple collection codes or call numbers

    SQL report of bib records linked to multiple collection codes or call numbers

    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 need a report of bib records which have items linked to them with either multiple collection codes or multiple call numbers. 

    Resolution

    The following is an SQL script (run in the ADM library)  which gives you that:

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

    spool bibs-with-multiple.lst

    select unique z13_rec_key, z13_title, a.z30_barcode, b.z30_barcode, a.z30_call_no, b.z30_call_no from xxx01.z13, z30 a, z30 b, 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 (a.Z30_REC_KEY,1,9) and substr (Z103_REC_KEY,6,9) = substr (b.Z30_REC_KEY,1,9) and (a.z30_collection ^= b.z30_collection or a.z30_call_no ^= b.z30_call_no) ;

    spool off
    exit

    <end script>

    Note:  you will need to change the "xxx01" and the "XXX01" to your local bib library.

     

     


    • Article last edited: 8-Mar-2018
    View article in the Exlibris Knowledge Center
    1. Back to top
      • SQL query to extract datasets of locally-created authority records
      • SQL Report of items which have never been checked out
    • 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