...
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT
*
FROM ${tenant}_mod_inventory_storage.holdings_record
WHERE ${tenant}_mod_inventory_storage.holdings_record.jsonb ->> 'sourceId' = (
SELECT
id::text
FROM ${tenant}_mod_inventory_storage.holdings_records_source
WHERE ${tenant}_mod_inventory_storage.holdings_records_source.jsonb ->> 'name' != 'FOLIO' AND
${tenant}_mod_inventory_storage.holdings_records_source.jsonb ->> 'name' != 'MARC') OR
${tenant}_mod_inventory_storage.holdings_record.jsonb ->> 'sourceId' IS NULL;; |
Script 2: Retrieve holdings where source= MARC and there is existing linked SRS MARC HOLDINGS record (by external_hrid) from records_lb from source-record-storage schema.
...