remove albermale references by putting in a variable and deleting usr messages
[migration-tools.git] / remove_ou_data / 08_remove_bibs_stage_3.sql
index 205d88a..e8e08f9 100644 (file)
@@ -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
 
@@ -27,7 +28,7 @@ CREATE INDEX tmp_bib_idx1 ON acq.lineitem (eg_bib_id);
 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)
 );