Oracle Magazine, September/October 2017
Database Application Developer and DBA BEYOND SQL 101 chosen file You issue the SPOOL OFF command to stop spooling and save and close your results file To append spooled results to a file youve already created you can add the APPEND syntax option such as ORACLE MAGAZINE SEPTEMBER OCTOBER 2017 116 spool user_ table_ last_ analyzed lst append If you do not add the APPEND keyword to your SPOOL command any existing file with the same name as that used in your SPOOL command will be overwritten with each execution of your script file Listing 6 includes several additional SQL Plus commands in the parameterize_ your_ script sql script file The LINESIZE or LINES command limits the number of characters displayed on one line before the output begins a new line PAGESIZE or PAGES defaults to a value whereby it repeats the display of column headings every 14 lines Setting the PAGESIZE value to a large number repeats the display of column headings fewer times and setting this value to 0 suppresses the display of column headings altogether TERMOUT or TERM controls the output display generated by the script commands Code Listing 6 Add more SQL Plus commands to your database script file Incorporate additional SQL Plus commands into your parameterize_ your_ script sql file spool user_ table_ last_ analyzed lst set verify off set linesize 60 set pagesize 100 set termout on
You must have JavaScript enabled to view digital editions.