[open-ils-commits] r9850 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 18 15:58:22 EDT 2008
Author: miker
Date: 2008-06-18 15:58:18 -0400 (Wed, 18 Jun 2008)
New Revision: 9850
Modified:
trunk/Open-ILS/src/sql/Pg/extend-reporter.sql
Log:
fixing reporter extention example
Modified: trunk/Open-ILS/src/sql/Pg/extend-reporter.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/extend-reporter.sql 2008-06-18 19:38:39 UTC (rev 9849)
+++ trunk/Open-ILS/src/sql/Pg/extend-reporter.sql 2008-06-18 19:58:18 UTC (rev 9850)
@@ -21,7 +21,7 @@
CREATE SCHEMA extend_reporter;
CREATE TABLE extend_reporter.legcay_circ_count (
- id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id)
+ id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id),
circ_count INT NOT NULL DEFAULT 0
);
@@ -29,7 +29,7 @@
SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count
FROM asset."copy" cp
LEFT JOIN extend_reporter.legcay_circ_count c USING (id)
- LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
+ LEFT JOIN "action".all_circulation circ ON circ.target_copy = c.id
GROUP BY cp.id;
COMMIT;
More information about the open-ils-commits
mailing list