Đang chuẩn bị liên kết để tải về tài liệu:
Oracle SQL Plus The Definitive Guide- P13

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Oracle SQL Plus The Definitive Guide- P13:Every day, computer professionals the world over wake up, travel to the office, sit down in front of a computer, and begin another day working with that database called Oracle. Programmers write queries and stored procedures. Database administrators monitor performance, make database changes, and perform other maintenance tasks. Operations people may need to back up or recover a database. | previous page page_97 next page Page 97 FROM EMPLOYEE E PROJECT P PROJECT_HOURS PH WHERE E.EMPLOYEE_ID PH.EMPLOYEE_ID AND P.PROJECT_ID PH.PROJECT_ID ORDER BY E.EMPLOYEE_ID P.PROJECT_ID PH.TIME_LOG_DATE Printing data in a page footer You can print data as part of the page footer using the same method just shown for the page header. The only difference is that you would normally use the OLD_VALUE clause with the COLUMN command rather than NEW_VALUE. That s because when SQL Plus prints the footer it has already read the next detail record from the database. Using NEW_VALUE for data in the footer would cause the footer to display information pertaining to the next page in the reportnot something you would normally want to happen. Totals and Subtotals SQL Plus allows you to print totals and subtotals in a report. To do this you use a combination of the BREAK command and one or more COMPUTE commands. This section continues where the previous section left off. It will show you how to modify the master detail report created earlier so that it totals the hours and dollars by project and by employee. You will also see how to print grand totals for these columns at the end of the report. The COMPUTE Command The COMPUTE command defines summary calculations needed in a report. You can use COMPUTE in conjunction with BREAK to calculate and print column totals averages minimum and maximum values and so on. These calculations are performed by SQL Plus as the report runs. Syntax of the COMPUTE command The syntax for the COMPUTE command looks like this COMP UTE AVG COU NT MAX IUM MIN IMUM NUM BER STD SUM VAR IANCE . LABEL label_text OF column_name. ON group_column_name ROW REPORT . where COMP UTE May be abbreviated to COMP. Entering COMPUTE with no parameters causes SQL Plus to list all currently defined computations. previous page page_97 next page previous page page_98 next page Page 98 AVG Computes the average of all non-null values for a column. AVG only applies to columns of .

TÀI LIỆU LIÊN QUAN