From: miker Date: Thu, 11 Jun 2009 18:22:31 +0000 (+0000) Subject: joins in the all_circulations reporting view were ... overzealous X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bbcb93addb48b9b6cd3f24e0021d77149228f846;p=evergreen%2Fbjwebb.git joins in the all_circulations reporting view were ... overzealous git-svn-id: svn://svn.open-ils.org/ILS/trunk@13370 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 1140dd4b6..ba5b1c749 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -161,7 +161,7 @@ CREATE OR REPLACE VIEW action.all_circulation AS max_fine_rule, stop_fines FROM action.aged_circulation UNION ALL - SELECT circ.id,COALESCE(a.post_code,b.post_code) AS usr_post_code, p.home_ou AS usr_home_ou, p.profile AS usr_profile, EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year, + SELECT DISTINCT circ.id,COALESCE(a.post_code,b.post_code) AS usr_post_code, p.home_ou AS usr_home_ou, p.profile AS usr_profile, EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year, cp.call_number AS copy_call_number, cp.location AS copy_location, cn.owning_lib AS copy_owning_lib, cp.circ_lib AS copy_circ_lib, cn.record AS copy_bib_record, circ.xact_start, circ.xact_finish, circ.target_copy, circ.circ_lib, circ.circ_staff, circ.checkin_staff, circ.checkin_lib, circ.renewal_remaining, circ.due_date, circ.stop_fines_time, circ.checkin_time, circ.create_time, circ.duration,