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. Searching BIB Fields with SQL

    Searching BIB Fields 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: 16.02

    Description:
    I'm wondering if there's a way to do basic catalog searches in SQL that's more efficient than "LIKE." For instance, to search for authors with last name = "Lasch"
    I'm doing this: select z13_author,z13_title from z13 where upper(z13_author) like 'LASCH%' It works ok, but it seems like I might be missing an index or something.
    The catalog searches I'm trying to do in SQL are: All Fields, Title Words, Exact Title, Periodical Title, Words, Exact Periodical Title, Author Words, Author - Corporate, Keywords, Subject, System number
    Is there any easier way?

    Resolution:
    You can search as you describe on the fields in the Z13: Author, Title, call number, and imprint.

    You could also search fields indexed in the Z11 (standard numbers) in the same way. (The Z01 Headings could be searched and then joined with the Z02 via the z01_acc_sequence number to get the z02 doc number; that's a bit more complicated. Searching the Words with SQL is not possible.)

    In 15.2-up you could search the Z00R fields. Searching "words" in Z13 fields in SQL could be done ( select z13_rec_key from z13 where z13_title like '%bird%' and z13_title like '%cat%';). But this would be very inefficient.

    Currently (as seen in UTIL-A-17-14) the z13 table has just a single Oracle index (the z13_id, built on the z13_rec_key -- the doc number). One could define additional Oracle indexes (following the examples in the ./alephm/sql_tab directory) on the z13_title, z13_author, etc. This would greatly improve the performance of SQL LIKE searches such as LIKE 'LASCH%', where you are starting with the first word in the fields. (Searches such as '%bird%' would not be improved.)

    Additional Information

    searching, fields, SQL


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Searches/results for another user appear on screen
      • Searching by ADM Number in Circulation Module
    • Was this article helpful?

    Recommended articles

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