[open-ils-commits] r13371 - branches/rel_1_4/Open-ILS/src/sql/Pg (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jun 11 14:23:22 EDT 2009


Author: miker
Date: 2009-06-11 14:23:19 -0400 (Thu, 11 Jun 2009)
New Revision: 13371

Modified:
   branches/rel_1_4/Open-ILS/src/sql/Pg/090.schema.action.sql
Log:
joins in the all_circulations reporting view were ... overzealous

Modified: branches/rel_1_4/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- branches/rel_1_4/Open-ILS/src/sql/Pg/090.schema.action.sql	2009-06-11 18:22:31 UTC (rev 13370)
+++ branches/rel_1_4/Open-ILS/src/sql/Pg/090.schema.action.sql	2009-06-11 18:23:19 UTC (rev 13371)
@@ -156,7 +156,7 @@
 		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,



More information about the open-ils-commits mailing list