SELECT id
FROM money.open_billable_xact_summary
) AND acn.deleted IS FALSE
+ AND ac.status NOT IN (1, 7);
SELECT
SELECT id
FROM money.open_billable_xact_summary
) AND acn.deleted IS FALSE
+ AND ac.status NOT IN (1, 7);
DELETE
+ my $delete_copies_stmt = <<DELETECOPIES;
+ UPDATE asset.copy
+ SET deleted = TRUE FROM asset.call_number acn
+ WHERE asset.copy.call_number = acn.id
+ AND acn.record IN (2237519,2239801,2239798,2239797,2239799,2239800,2247576)
+ AND acn.deleted IS TRUE
+ AND asset.copy.deleted IS FALSE
+ AND asset.copy.circ_lib = 103
+ AND asset.copy.status NOT IN (1, 7);
+DELETECOPIES
+
my $results = $dbh->selectcol_arrayref($select_stmt);
print localtime() . " - found " . scalar(@$results) . " RACER book call numbers to delete:\n";
if (scalar(@$results)) {
}
my $stmt = $dbh->prepare($delete_stmt);
my $updates = $stmt->execute();
+ $stmt = $dbh->prepare($delete_copies_stmt);
+ $updates = $stmt->execute();
}
}