TAILIEUCHUNG - Oracle SQL Plus The Definitive Guide- P16

Oracle SQL Plus The Definitive Guide- P16: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_127 next page Page 127 SQL @c hours_dollars_b Enter value for employee_id 111 As commands are executed SQL Plus constantly looks for the ampersand character indicating a substitution variable. When an ampersand is encountered the next token in the command is treated as a variable. SQL Plus first looks to see if that variable has been previously defined. In this example it hasn t so SQL Plus automatically prompts for the value. After prompting for a value and substituting it into the script in place of the corresponding variable SQL Plus will display both the old and the new versions of the particular line of script involved. During development this aids you in verifying that your script is executing correctly. Here are the before and after versions of the line containing the employee_id variable from the current example old 13 new 13 AND employee_id AND 111 Next SQL Plus goes on to tead the remining lines from the script producing this hours and dollars report for Taras Shevchenko The Fictional Company Project Hours and Dollars Detail Employee 111 Taras Shevchenko Dollars Proj ID Project Name Date Hours Charged 1001 Corporate Web Site 01-Jan-1998 1 01 Mar-1998 3 01 May-1998 5 01-Jul-1988 7 01-Sep-1998 1 01-Nov-1998 3 Project Totals 20 2 In addition to being displayed on the screen the report is also spooled to the file specified in the script. When TERMOUT is off In the example just shown the report was both displayed on the screen and spooled to a file. In Chapter 3 you saw how the SET TERMOUT OFF command could be used to suppress output to the display while still allowing it to be previous page page_127 next page previous page page_128 next page Page 128 spooled thus making a report run much faster. Trying to do the same thing in this case presents a special problem. The problem is that the command to turn TERMOUT off must precede the SELECT statement .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.