When you save SQL statements in a command file, as described in Saving the Current SQL Statement, you can retrieve the command file and run or edit the SQL statements at any time.
Select the Choose option on the SQL menu to display the CHOOSE screen with a list of the command files that you can access. These files have the extension .sql, although the extension is not shown. For example, Figure 19 lists the command files included in the demonstration database.
CHOOSE >>
Choose a command file with the Arrow Keys, or enter a name, then press Return.
---------------- mystores@dbserver1 ----------- Press CTRL-W for Help -------
alt_cat c_state d_trig sel_ojoin1
c_calls c_stock d_view sel_ojoin2
c_cat c_stores del_stock sel_ojoin3
c_custom c_table ins_table sel_ojoin4
c_index c_trig opt_disk sel_order
c_items c_type sel_agg sel_sub
c_manuf c_view1 sel_all sel_union
c_orders c_view2 sel_group upd_table
c_proc d_proc sel_join
If no current database exists, the list includes all the command files located in the current directory and in any directories that the DBPATH environment variable specifies.
To select a command file, use the arrow keys to highlight its name or enter the name of the file at the prompt.
When the SQL menu reappears, it displays the command file statements on the screen as the current statements. To modify, run, edit, or output these statements, choose the appropriate menu option.
To leave the CHOOSE screen without selecting a command file, press the Interrupt key, which returns you to the SQL menu.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]