Recent Changes Printable View Page History Edit Page

This shows all the past checkouts for all copies of an item whose title and call number contain the specified string(s). It's only been lightly tested.

.title "Item Checkout History"
.category Circulation
.column bibid hidden
.column call_num sort=call_num
.column title sort=title func=biblio_link
.column author sort=author
.column mbrid hidden
.column member sort=member func=member_link
.column checkout sort=checkout
.column due sort=due
.	string title
.	string call_num title='Call Number'
.	order_by default=title
.		item call_num expr='CONCAT(b.call_nmbr1, b.call_nmbr2, b.call_nmbr3)'
.		item title expr='CONCAT(b.title,b.title_remainder)'
.		item author expr=''
.		item member expr='CONCAT(m.last_name, m.first_name)'
.		item checkout expr='s.status_begin_dt'
.		item due expr='s.due_back_dt'
.	end order_by
.end parameters
	SELECT b.bibid,
		CONCAT_WS(' ', b.call_nmbr1, b.call_nmbr2, b.call_nmbr3) AS call_num,
		CONCAT(b.title, ' ', b.title_remainder) AS title,, m.mbrid,
		CONCAT(m.last_name,', ',  m.first_name) AS member,
		s.status_begin_dt AS checkout,
		s.due_back_dt AS due
	FROM biblio b, biblio_status_hist s, member m
	WHERE s.bibid=b.bibid AND s.mbrid=m.mbrid
		AND s.status_cd='out'
.if_set title
		AND CONCAT(b.title, ' ', b.title_remainder) LIKE '%%%"title%%%'
.end if_set
.if_set call_num
		AND CONCAT_WS(' ', b.call_nmbr1, b.call_nmbr2, b.call_nmbr3) LIKE '%%%"call_num%%%'
.end if_set
.	order_by_expr
.end sql Logo
Edit Page - Page History - Printable View - Recent Changes - Search
Page last modified on March 01, 2008, at 07:34 PM