Hình 6-2 cho thấy một báo cáo nhanh chóng và dễ dàng cho thấy những cuốn sách ngày đã được kiểm tra và trả lại. Hình 6-3 cho thấy các tập tin bắt đầu SQLPLUS sản xuất báo cáo này, trong trường hợp này có tên là . Để chạy chương trình này báo cáo trong sqlplus, loại này: bắt đầu | 94 Part II SQL and SQL Plus myeditor FIGURE 6-1. Report creation process Building a Simple Report Figure 6-2 shows a quick and easy report showing the dates books were checked out and returned. Figure 6-3 shows the SQLPLUS start file that produced this report in this case named . To run this report program in SQLPLUS type this t start Chapter 6 Basic SQL PLUS Reports and Commands 95 Thu Apr 04 1 02-3 31 02 page 1 Days Out NAME Checkout Log for 1 CHECKOUTD RETURNEDD TITLE DORAH TALBOT EITHER OR 02-JAN-02 10-JAN-02 POLAR EXPRESS 01-FEB-02 15-FEB-02 GOOD DOG CARL 01-FEB-02 15-FEB-02 avg MY LEDGER 15-FEB-02 03-MAR-02 - - EMILY TALBOT ANNE OF GREEN GABLES 02-JAN-02 20-JAN-02 MIDNIGHT MAGIC 20-JAN-02 03-FEB-02 avg HARRY POTTER AND THE GOBLET OF FIRE 03-FEB-02 14-FEB-02 - - FRED FULLER JOHN ADAMS 01-FEB-02 01-MAR-02 avg TRUMAN 01-MAR-02 20-MAR-02 - GERHARDT KENTGEN WONDERFUL LIFE 02-JAN-02 02-FEB-02 MIDNIGHT MAGIC 05-FEB-02 10-FEB-02 avg THE MISMEASURE OF MAN 13-FEB-02 05-MAR-02 - JED HOPKINS INNUMERACY 01-JAN-02 22-JAN-02 avg TO KILL A MOCKINGBIRD 15-FEB-02 01-MAR-02 - PAT LAVAY THE SHIPPING NEWS 02-JAN-02 12-JAN-02 avg THE MISMEASURE OF MAN 12-JAN-02 12-FEB-02 - ROLAND BRANDT THE SHIPPING NEWS 12-JAN-02 12-MAR-02 THE DISCOVERERS 12-JAN-02 01-MAR-02 avg WEST WITH THE NIGHT 12-JAN-02 01-MAR-02 - avg from the Bookshelf FIGURE 6-2. Bookshelf checkout report output 96 Part II SQL and SQL Plus rem Bookshelf activity report 4 set headsep 4 ttitle btitle Checkout Log for 1 1 02-3 31 02 4 from the Bookshelf column column column column Name format a20 Title format a20 word_wrapped DaysOut format 4---------- DaysOut heading Days Out 4----- break on Name skip 1 on report 4 compute avg of DaysOut on Name 4 compute avg of DaysOut on report set linesize 80 -4 set pagesize 60 set newpage 0 set .