Skip to main content
ExLibris
  • Subscribe by RSS
  •  

    Ex Libris Knowledge Center

    SQL to list patron barcodes/addresses for a particular patron type

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

    Description:
    We need to generate a list of patrons where the patron type is "RH" We need the patron barcode and address (building, room number) and phone number.

    How do I go about doing this?

    Resolution:
    The following SQL (where abc50 is the ADM library and the $usr_library) should give you that information:

    > s+ abc50

    SQL> select substr (z308_rec_key,3,20), z304_address from z308, z304, z305 where z305_bor_type = 'RH' and rtrim ( substr (z305_rec_key,1,12)) = rtrim (substr (z308_id,1,12)) and substr (z305_rec_key,1,12) = substr (z304_rec_key,1,12) and z308_rec_key like '01%';


    • Article last edited: 10/8/2013