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. Querying Z00-DATA with SQL

    Querying Z00-DATA with SQL

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Additional Information
    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    I'd like to get a list of items which have in their parent bib record a specific field value .

    Since the bib field is only in Z00_DATA (field 937$b), I cannot use LIKE %...%.
    Is there a "LIKE" equivalent for LONG data type? Or another way to query parts of Z00_DATA?

    SELECT Z30.Z30_REC_KEY FROM ABC50.Z30,ABC50.Z103,ABC01.Z00
    WHERE Z30_ITEM_PROCESS_STATUS = 'MI'
    -----> AND Z00_DATA LIKE %$$b0820% <-----
    AND ABC01.Z00.Z00_DOC_NUMBER = substr (UTR50.Z103.Z103_REC_KEY_1,6,9)
    AND substr (ABC50.Z103.Z103_REC_KEY_1,1,5) = 'ABC01'
    AND substr (ABC50.Z103.Z103_REC_KEY,6,9) = substr (ABC50.Z30.Z30_REC_KEY,1,9);

    Resolution:
    There is no "LIKE" equivalent for LONG data type; "select ... where" is not valid. This is discussed in KB 8192-3802. There is no way to query parts of Z00_DATA.

    If the field you were looking for were in the z13 record, that could be used, but since it is not and since I see that you have the z00r, you should use the z00r instead. This is exactly why the option of generating the z00r was added.

    KB's 16384-14801 and 3930 have examples of SQL queries going against the z00r.

    Additional Information

    z00_data


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Query showing that Oracle Statistics are on
      • Question about AMM "recommendation" in database upgrade documentation
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    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