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. SUBSTRB vs. SUBSTR

    SUBSTRB vs. SUBSTR

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Question
    2. Answer
    • Article Type: Q&A
    • Product: Aleph
    • Product Version: 22

    Question

    The ./upgrade_express_2101_2201/source/1001/z304_insert_records.sql and the./upgrade_express_2101_2201/source/1003/z308_insert_records.sql use "SUBSTRB" instead of "SUBSTR" in their SQL queries of the new fields which allow multi-byte characters in the v22 z304 (patron address) and z308 (patron IDs) tables. Should "SUBSTRB" also be used (instead of SUBSTR) in the customer's own SQL queries of patron addresses, ID's, and foreign vendor addresses?

    Answer

    In all fields which may potentially have multi-byte-characters it is better to use SUBSTRB instead of SUBSTR. SUBSTR calculates lengths using characters as defined by the input character set. SUBSTRB uses bytes instead of characters.


    • Article last edited: 3/6/2014
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Subscriptions: global changes
      • Subtype in expand_doc_bib_subtype
    • Was this article helpful?

    Recommended articles

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