I found Nicole's report in the SQL library for "Patrons with fines".

I modified it to allow our libraries to choose their "branch".

But it doesn't seem to run.

Can someone show me where the problem is, please?

Kathy
-----------------------------------

SELECT
   borrowers.cardnumber,
   borrowers.surname,
   borrowers.firstname,
   FORMAT(SUM(accountlines.amountoutstanding),2) AS due
FROM
   borrowers
LEFT JOIN
   accountlines
ON
   (borrowers.borrowernumber=accountlines.borrowernumber)
WHERE
   accountlines.amountoutstanding > 0 AND borrowers.branchcode='__BRANCHCODE__'
GROUP BY borrowers.cardnumber
ORDER BY borrowers.surname ASC
Kathleen D. Rippel
Dept. Head/Consultant--Resource Sharing and Access ;
Pathfinder Central (Manager)
Central Kansas Library System
1409 Williams
Great Bend, KS 67530

(620-792-4865) phone
(800-362-2642) toll-free, KS
(620-792-5495) fax

k...@ckls.org
********************************************************************************************
I'm currently reading: This fatal writ, by Sara Woods.
I'm currently listening to: The passage, by Justin Cronin.  

_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to