Ben, CREATE TABLE public.single_lib_bibs AS (SELECT record FROM asset.call_number WHERE owning_lib=1234); SELECT id FROM biblio.record_entry WHERE record IN (SELECT record FROM public.single_lib_bibs); --dump this to a txt file