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

    SQL to show out-of-sync Bib/ADM record keys

     

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

     

    Description

    What SQL will show bib/ADM keys which are out of synch?

    Resolution

    This SQL gives a count of cases where the Bib number does not match the ADM number:

    > s+ xxx50
    cjh50@ALEPH22> select count(*) from z103 where substr (z103_rec_key_1,1,5) = 'XXX01' and  substr (z103_rec_key,6,9) ^= substr (z103_rec_key_1,6,9) order by substr (z103_rec_key,1,14);

     
    The following SQL can be used to list these cases:

    > s+ xxx50
    SQL> select substr (z103_rec_key,1,14), z103_rec_key_1 from z103 where substr (z103_rec_key_1,1,5) = 'XXX01' and  substr (z103_rec_key,6,9) ^= substr (z103_rec_key_1,6,9) order by substr (z103_rec_key,1,14);

     

     


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