You can save SQL statements in a file for later use, such as to invoke the statements from the command line (see Executing a Command File) or retrieve the saved statements with the Choose option on the SQL menu.
To save the current SQL statement or statements in a file, select the Save option on the SQL menu. The SAVE screen appears and prompts you to enter a name for the command file, as Figure 20 shows.
SAVE >>
Enter the name you want to assign to the command file.
-------------------mystores@dbserver1 --------- Press CTRL-W for Help -----
select max (ship_charge), min (ship_charge)
from orders;
You assign the left portion of the filename. Use 1 to 10 characters. Start with a letter, then use any combination of letters, numbers, and underscores (_). Press RETURN to save the file.
You can use uppercase and lowercase letters in the name. However, remember that UNIX operating systems are case sensitive. The file orders is not the same as Orders or ORDERS.
DB–Access appends the extension .sql to the name that you assign when it stores the statements in a file. For example, if you name your file cust1, DB–Access stores the file with the name cust1.sql. The CHOOSE screen still lists cust1, but the operating system identifies the same file as cust1.sql if you list the directory files from the command line.
To leave the SAVE screen without assigning a name to a command file, press the Interrupt key, and you return to the SQL menu.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]