X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F08_remove_bibs_stage_1.sql;h=e38c05913ec04c32b1d7d120dcb973c657af9aef;hp=a81c9ae58707a80977844778e03251674baecf86;hb=9e967d7a4207176f0778f0e296ab39d8223eb431;hpb=c919228a7234c1fdfa9f9cfbae245fc30731eb85 diff --git a/remove_ou_data/08_remove_bibs_stage_1.sql b/remove_ou_data/08_remove_bibs_stage_1.sql index a81c9ae..e38c059 100644 --- a/remove_ou_data/08_remove_bibs_stage_1.sql +++ b/remove_ou_data/08_remove_bibs_stage_1.sql @@ -16,6 +16,7 @@ -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \set ou_to_del ''''EXAMPLE'''' +\set vol_del_table ORGUNIT_volume_bibs \set ECHO all \timing @@ -24,7 +25,7 @@ ALTER TABLE biblio.record_entry DISABLE TRIGGER audit_biblio_record_entry_update BEGIN; DELETE FROM biblio.record_entry WHERE id IN ( - SELECT record FROM esi.albemarle_volume_bibs x + SELECT record FROM esi.:vol_del_table x WHERE NOT EXISTS (select 1 from asset.call_number where record = x.record) );