From 5daa7e37fb3828e5bc77a037afce5c94f755cd4d Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Mon, 17 Oct 2016 10:08:39 -0400 Subject: [PATCH] deletions of non cat circs --- remove_ou_data/04_remove_circ.sql | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/remove_ou_data/04_remove_circ.sql b/remove_ou_data/04_remove_circ.sql index 786de02..f011c1b 100644 --- a/remove_ou_data/04_remove_circ.sql +++ b/remove_ou_data/04_remove_circ.sql @@ -44,6 +44,12 @@ DELETE FROM action.aged_circulation WHERE copy_circ_lib IN DELETE FROM action.aged_circulation WHERE copy_owning_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); +DELETE FROM action.non_cat_in_house_use WHERE org_unit IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + +DELETE FROM action.non_cat_in_house_use WHERE staff IN +(SELECT id FROM actor.usr WHERE home_ou IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); + COMMIT; ALTER TABLE action.circulation ENABLE TRIGGER action_circulation_aging_tgr; -- 1.7.2.5