Oracle Magazine, September/October 2017
Database Application Developer and DBA BEYOND SQL 101 TABLE_ NAME NUM_ ROWS LAST_ ANALYZED EMPLOYEE 16 13 MAY 2017 14 46 32 The expanded parameterize_ your_ script sql file demonstrates how the first command line parameter value EMPLOYEE is passed to the 1 parameter and the second parameter value 10 is passed to the 2 parameter Note that this kind of notation works only if your parameterized substitution variable is a number from 1 to 9 Additionally the script file in Listing 4 shows how just as with the named substitution variables you need to remember to place single quotes around any parameters to which you expect to pass string values The example in Listing 4 also demonstrates how the double line substitution variable replacement display shown in Listings 1 through 3 can be suppressed with the ORACLE MAGAZINE SEPTEMBER OCTOBER 2017 113 set verify off SQL Plus command Code Listing 4 Add a second parameter and turn off substitution variable replacement display Alter parameterize_ your_ script sql to include a second parameter and turn off substitution variable replacement display set verify off select table_ name num_ rows to_ char last_ analyzed DD MON YYYY HH24 MI SS last_ analyzed
You must have JavaScript enabled to view digital editions.