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. How to view LONG (BLOB) or CLOB columns via SQL

    How to view LONG (BLOB) or CLOB columns via 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: 18.01

    Description:
    I want to be able to see the z00_data (format: LONG) and z00p_data (format: CLOB).

    I can do this:

    select z00_data from z00 where z00_doc_number = '000000123'; or

    select z00p_ptr from z00p where z00p_doc_number = '000000123';

    and I see the bib record in a "raw" form, but if I try to view big bib records, the result is truncated.

    Also, I am unable to do a select ... where:

    abc01@ALEPH1> select z00_data from z00 where z00_data like '%Estado%';

    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG

    Resolution:
    In order to see longer z00 records, you need to do the "set long" command prior to the "select":

    SQL> set long 45000

    (45,000 is the maximum doc record size in Aleph.)

    or for the z00p:

    SQL> set long 1000000

    (n can be up to 2 million.)

    This will enable you to see the entire z00_data or z00p_data field.

    Note: Longer records will scroll off the screen and, even scrolling up, you will not be able to see them. To see the entire record, you will need to enter a "spool" command prior to the select. Then you can quit SQL and do "more" on the file you spooled.

    There is no way to do an SQL "select .. where" against a LONG column. If you want to find records containing particular bib field values using SQL, you need to search the z00r or z13.

    The "select ... where" does work OK against a *CLOB* in Oracle 10-up.

    Additional Information

    faq


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • How to view history of hold requests
      • How to view submtted GUI Service job parameters without actually running job
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 18.01
      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