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

    Joining bib Z13 table with adm Z30 table in SQL

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Desired Outcome Goal:
    To join the bib library Z13 (Short Bibliographic record) table with the adm library Z30 (Item) table in SQL when the bib and adm record keys are not in synch.

    Procedure:
    > s+ xxx50

    SQL-XXX50> SELECT /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ Z13_TITLE, Z30_BARCODE from EXU01.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);

    Additional Information

    Note 1: the /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ is not strictly necessary. It is included for performance reasons.

    Note 2: If the Bib and ADM numbers are still in synch -- which is not at all required or expected by Aleph --, then the following SQL could be used:

    SQL-XXX50> SELECT /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ Z13_TITLE, Z30_BARCODE from EXU01.Z13, EXU50.Z30 where Z13_REC_KEY = substr (Z30_REC_KEY,1,9); 

    Category: System management


    • Article last edited: 10-Dec-2018