Specifying a Range of HRIDs from 

Each instance, holding, and item has an HRID (Human Readable ID number) associated with it, e.g. holdings HRID 10171484.

If you want to specify a range of HRIDs in your report results, you can use


SELECT  
  ih.hrid AS holdings_hrid
FROM 
inventory_holdings AS ih WHERE
ih.hrid:: INTEGER BETWEEN '454390' AND '454393' ;


Keep in mind that INTEGER BETWEEN will only work with numeric HRIDs. CUL HRIDs are exclusively numeric.


Here is an example for Specifying a Range of HRIDs if you are using a MARC table

SELECT
        SM.field,
        SM."content",
        II.hrid
    FROM
        public.srs_marctab SM
    INNER JOIN public.inventory_instances AS II ON
        SM.instance_hrid = II.hrid

    WHERE
        II.hrid::INTEGER BETWEEN '15077113' AND '15077535'
        AND SM.field = '000'
    ORDER BY
        II.hrid;





  • No labels