Your solution should have followed these steps:
- You executed the query for your report by typing / at the SQL> prompt and pressing Enter.
- You created a file with this query in it so that you could add some SQL*Plus commands to it. You wrote the query to a file named CUST_BUY.sql by typing
SAVE CUST_BUY at the SQL> prompt and pressing Enter.
- You made some changes to the file you created by starting up a text editor. You typed
EDIT CUST_BUY at the SQL> prompt and pressed Enter.
- In the first line of the file, you typed
COLUMN SALES_DATE HEADING "SALES DT" to change the heading of the first column in the Select clause to SALES DT. You then pressed Enter.
- You changed the column width to 15 characters and changed the column heading to NAME by typing
COLUMN LASTNAME FORMAT A15 HEADING "NAME" in the next line. You then pressed Enter.
- You changed the column width to two numeric characters and changed the column heading to # ITEMS by typing
COLUMN PROD_COUNT FORMAT 99 HEADING "# ITEMS" in the next line. You then pressed Enter.
- You typed
COLUMN TOTAL_SALE FORMAT 9999.99 HEADING "PMT" at the first blank line in the file to change the column width to four numbers to the left and two numbers to the right of the decimal point,
and to change the column heading to PMT. You then pressed Enter.
- You changed the number of lines per page to 22 by typing
SET PAGESIZE 22 at the first blank line in the file and then pressing Enter.
- You changed the number of characters per line to 45 by typing
SET LINESIZE 45 in the next blank line and then clicking the X in top right corner to close the text editor.
- You saved your changes by clicking the Yes button. /li>
- You tested your query and the SQL*Plus environment settings you made by typing
START CUST_BUY at the SQL> prompt and pressing Enter.
- You viewed the query results and then completed the exercise by clicking the Exit button.