SQL query: Who has issued the '1234' barcoded book? and when?
Hi Please help me to find solutions bellow matter Recently our library had a problem of issuing a few books to wrong patrons' name by a staff member in circulation counter ( nearly 15 staff member work in the desk in time to time /month as we have roster based duties in the counter) In looking SQL queries for 1. Who has issued the given barcoded book? and when? 2. What are the books issued by staff-ID( with time) ? Harsha Balasooriya Senior Assistant Librarian, Systems The Open University of Sri Lanka Tel: 011-2881030
hiii, Please find below the report which we are using to check the actions taken in our library, it is datewise report in descending order: IF(a.action="ISSUE", CONCAT('<a href=\"/cgi-bin/koha/reports/ guided_reports.pl?phase=Run+this+report&reports=1275&sql_params=',a.info,' \">Checkout Details</a>'), IF(a.action="RETURN",CONCAT('<a href=\"/cgi-bin/koha/reports/ guided_reports.pl?phase=Run+this+report&reports=1276&sql_params=',a.info,' \" >Checkin Details</a>'),a.info) ) as DETAILS from action_logs a left join borrowers b ON (b.borrowernumber=a.user) where (a.module="MEMBERS" OR (a.action="ISSUE" OR a.action="RETURN" )) AND timestamp between<<From date:yyyy-mm-dd>>AND<<To date:yyyy-mm-dd>> ORDER BY a.timestamp DESC hope this helps you!!!!!!!!! On Tue, Feb 4, 2014 at 9:04 AM, HRS <bala.allmail@gmail.com> wrote:
Hi
Please help me to find solutions bellow matter
Recently our library had a problem of issuing a few books to wrong patrons' name by a staff member in circulation counter ( nearly 15 staff member work in the desk in time to time /month as we have roster based duties in the counter)
In looking SQL queries for
1. Who has issued the given barcoded book? and when? 2. What are the books issued by staff-ID( with time) ?
Harsha Balasooriya Senior Assistant Librarian, Systems The Open University of Sri Lanka Tel: 011-2881030 _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- Regards, Vishal Patil Landline number:02232080161 E-Mail: *vishal_wpatil@nucsoft.co.in <vishal_wpatil@nucsoft.co.in>* *vishal.patil@osslabs.biz <vishal.patil@osslabs.biz>.*
1. Who has issued the given barcoded book? and when? 2. What are the books issued by staff-ID( with time) ?
You might something in the SQL Reports Library that may help: http://wiki.koha-community.org/wiki/SQL_Reports_Library Regards. (Sending to the list this time....) David Nind | david.nind@gmail.com PO Box 12367, Thorndon, Wellington, New Zealand 6144 h. +64 4 9720 600 | m. +64 21 0537 847 | w. +64 4 8906 098
HRS [bala.allmail@gmail.com] wrote:
In looking SQL queries for
1. Who has issued the given barcoded book? and when? 2. What are the books issued by staff-ID( with time) ?
SELECT action_logs.timestamp, borrowers.userid, borrowers.firstname, borrowers.surname, action_logs.action, items.barcode, biblio.title FROM action_logs, borrowers, items, biblio WHERE action_logs.action = 'ISSUE' AND action_logs.user = borrowers.borrowernumber AND items.biblionumber = biblio.biblionumber AND items.itemnumber = action_logs.info This will list all issues. To search for a specific barcode just add a line like: AND items.barcode = 1234 To search for staff-ID add: AND borrowers.userid = 'example' Regards Holger
participants (4)
-
David Nind -
Holger Meissner -
HRS -
vishal patil