X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F04_remove_circ.sql;fp=remove_ou_data%2F04_remove_circ.sql;h=5898f25ee8f6bfb4c6e3c22b44f8d1f402308f55;hp=ed115607d90b7af63efb9371297a63a67627566e;hb=b7e454b73970bda780caf3830ba844ece0379bee;hpb=0c0fb7ed46be05a8e344c141238b63433594fa21 diff --git a/remove_ou_data/04_remove_circ.sql b/remove_ou_data/04_remove_circ.sql index ed11560..5898f25 100644 --- a/remove_ou_data/04_remove_circ.sql +++ b/remove_ou_data/04_remove_circ.sql @@ -51,7 +51,7 @@ AND org_unit IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit DELETE FROM action.usr_circ_history WHERE id IN (SELECT a.id FROM action.usr_circ_history a LEFT JOIN action.circulation b ON b.id = a.source_circ WHERE b.id IS NULL); -DELETE FROM action.circulation_limit_group_map WHERE circ IN (SELECT a.id FROM action.circulation_limit_group_map a LEFT JOIN action.circulation b ON b.id = a.circ WHERE b.id IS NULL); +DELETE FROM action.circulation_limit_group_map WHERE circ IN (SELECT a.circ FROM action.circulation_limit_group_map a LEFT JOIN action.circulation b ON b.id = a.circ WHERE b.id IS NULL); COMMIT;