跳到主要內容

Koha 圖書館自動化系統: 報表SQL程式

說明

這裡的SQL程式, 都是來自於Koha社群及碩陽公司提供的免費報表程式,如貴單位有使用Koha,除可從此處複製使用外,您也可至社群處取得最新的報表程式。以下範例皆連結至碩陽公司的 http://koha.sydt.com.tw 示範站。

書目編號連結

本程式可自動將書名加上其在系統裡的詳目頁連結。

SELECT
  biblionumber, 
  CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',biblionumber,'\">',title,'</a>') AS Title 
FROM biblio 
ORDER BY biblionumber

 

biblionumber Title
1 商業周刊.
2 Smart 智富月刊.
3 電腦家庭 =
4 行遍天下 :
5 她雜誌 =
6 大家健康 =
7 天下雜誌.
8 講義.
9 開放近用
10 MARC 21書目紀錄中文手冊 :

 

詳細書目及複本統計

  • Developer: Matthew Charlesworth
  • Module: Catalogue
  • Purpose: The report allows direct interaction with the records in the Staff Interface (using example of CONCAT with A HREF and TITLE codes). Lists Bib details of items and # of copies as well as bibnumber to go directly to item record.
  • Status: Completed
SELECT DISTINCT CONCAT('<a title="Search for Title with Biblionumber:
',b.biblionumber,'"
href="/cgi-bin/koha/catalogue/search.pl?q=ti%3A',REPLACE (b.title, '
', '+'),'">Search</a>') AS "Search for Title", b.biblionumber, CONCAT('<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=',b.biblionumber,'">',b.title,'</a>')
AS "Item Title", b.author, t.editionstatement, t.publishercode, t.isbn, count(i.itemnumber) AS "Copies" FROM biblio b LEFT JOIN biblioitems t USING(biblionumber) LEFT JOIN items i USING(biblionumber) GROUP BY b.biblionumber ORDER BY Copies ASC

 

Search for Title biblionumber Item Title author editionstatement publishercode isbn Copies
Search 1 商業周刊.     商周文化事業公司,   1
Search 2 Smart 智富月刊.     電腦家庭文化事業公司,   1
Search 3 電腦家庭 =     電腦家庭文化事業,   1
Search 4 行遍天下 :   初版 宏碩發行 : | 高見總經銷,   1
Search 5 她雜誌 =   國際中文. 台祥圖書總經銷,   1
Search 6 大家健康 =     董氏基金會,   1
碩陽數位科技有限公司 TEL:(02) 8226-5657 (02) 8228-0288 FAX:(02) 8226-5022