X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F03_remove_holds.sql;fp=remove_ou_data%2F03_remove_holds.sql;h=de1aac12cb0b46e611b9164598562f41da44f51e;hp=433f3efdd69997a6c03f567d624d4cc4e8b45302;hb=3e12dd990b438752403a9e21bdfbd47deb95ca17;hpb=6b1c7d0b5585d2de5fac7d7803c475f88d560186 diff --git a/remove_ou_data/03_remove_holds.sql b/remove_ou_data/03_remove_holds.sql index 433f3ef..de1aac1 100644 --- a/remove_ou_data/03_remove_holds.sql +++ b/remove_ou_data/03_remove_holds.sql @@ -30,6 +30,8 @@ DELETE FROM action.hold_request WHERE current_shelf_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); DELETE FROM action.hold_request WHERE pickup_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); +DELETE FROM action.hold_request WHERE request_lib IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); DELETE FROM action.aged_hold_request WHERE pickup_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del);