Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Voyager

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Voyager
    3. Knowledge Articles
    4. Simple overview of counting things in Voyager Prepackaged Access Reports

    Simple overview of counting things in Voyager Prepackaged Access Reports

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Question
    2. Answer
    • Product: Voyager
    • Relevant for Installation Type: Multi-Tenant Direct, Dedicated-Direct, Local, TotalCare

     

    Question

    Some simple tips on how to count things in Voyager Prepackaged Access Reports.

    Answer

    There are 2 basic kinds of Access queries: list-of-stuff kinds of queries and calculate-stuff kinds of queries. 

    Counting things are calculate-stuff queries.

    Simply put, counting things counts rows.

    For example: Let's say we want to know how many barcodes each patron has?  We know that patrons can have multiple barcodes. It can get quite complicated. Here's our initial query:

    clipboard_ea30f615d5963aaf3e3da2d26aed7b766.png

     

    We a use a simple join on the PATRON and PATRON_BARCODE tables.  We need to join them by PATRON_ID. After pulling down the three columns we need, we click on the Sigma Tool (a/k/a "Totals") clipboard_ed7c00e7592965968bb373580854e23c7.png .

    clipboard_e3167824cff7ddac2bbd71c85f215ee31.png

    A new row is created labeled "Total".

    Each column is filled in by Group By.

    Since we want to Count the barcodes, we select the PATRON_BARCODE column and change it to "Count"

    clipboard_e77e15894406d274b9efabcd768bfe3d4.png

     

    Then run the query.  Here are the results:

    clipboard_efeb25b3e87b67dc90bce4bb35e7b18eb.png

     

    We can compare your results with the client to check if this is correct or not.

    Note that the FIELD we choose to count does not define what we are counting!

    It usually doesn't matter which field you choose to count because we are counting ROWS and not Fields. The exception to this rule is when the field has a value of NULL.  When this happens it can mess up your results.  

    And so, it is usually best to choose to count one of the _ID fields because they are never NULL (unless you do some sort of extremely complex outer joins).

     

    Constructing custom SQL queries by request and troubleshooting unexpected results from customer-created SQL queries falls outside the scope of Support. The above has been posted for informational purposes.  Voyager-L and Developer Network are useful resources for finding helpful custom SQL or obtaining assistance from peers in troubleshooting custom queries.

     


    • Article last edited: 21-MAY-2021
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Shutdown errors in extract log?
      • Simple overview of totaling a value in Voyager Prepackaged Access Reports
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Voyager
    2. Tags
      This page has no tags.
    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