From: miker Date: Mon, 8 Feb 2010 17:40:51 +0000 (+0000) Subject: adding IDL view to calculate the date of removal for the last copy on a bib record X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f1f020e300050916b528f3c81e542e28feb62976;p=evergreen%2Fpines.git adding IDL view to calculate the date of removal for the last copy on a bib record git-svn-id: svn://svn.open-ils.org/ILS/trunk@15471 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index bdafe1099a..de39fc2474 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6245,6 +6245,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + SELECT b.id, + MAX(dcp.edit_date) AS last_delete_date + FROM biblio.record_entry b + JOIN asset.call_number cn ON (cn.record = b.id) + JOIN asset.copy dcp ON (cn.id = dcp.call_number) + WHERE NOT b.deleted + GROUP BY b.id + HAVING SUM( CASE WHEN dcp.deleted THEN -1 ELSE 0 END) < 0 + + + + + + + + + + + + + + + + +