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. Performing calculations on fields (such as z31_sum ) with CHAR datatype

    Performing calculations on fields (such as z31_sum ) with CHAR datatype

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    • Article Type: General
    • Product: Aleph
    • Product Version: 16.02

    Description:
    For ADM table z31, the datatype of Z31-SUM is CHAR(14). Is there a way I can strip out the leading zero’s and then put a dollar sign and a decimal point? Can I change this datatype to NUMBER?

    Resolution:
    You can not change the definition of this table in Oracle, but this should give you what you want.
    Instead of [select ...]

    Z31_SUM as "Amount",

    you would do:

    Z31_SUM/100 as "Amount",

    This will give you the proper decimal place.

    If you need the dollar sign, you can do:

    COLUMN TO_NUMBER(Z31_SUM)/100 FOR '$999,999,999,999.99'
    SELECT TO_NUMBER(Z31_SUM)/100 FROM Z31;


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Performance problems with ADM-bib SQL queries involving Z103
      • Period field blank in Course Reserve Document Full View
    • 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