DB2 Server for VSE & VM: Interactive SQL Guide and Reference


Protecting a Stored Statement

If the name you use with the STORE command is the name of a statement that is already stored, and you do not use the REPLACE keyword, you receive a warning message. The warning gives you the following choices:

The message itself appears as in Figure 40.

Figure 40. Warning Message Displayed If You Try to Store a Name Already Stored

+--------------------------------------------------------------------------------+
|ARI7955I The system ended your query result to process your command.            |
|ARI7577D A stored SQL statement named DEPT already exists.                      |
|         Enter a new name to store the SQL statement, or enter                  |
|         one of the following keywords:                                         |
|         REPLACE - to replace the existing stored SQL statement, or             |
|         END - to end the store command processing.                             |
+--------------------------------------------------------------------------------+

You can use the REPLACE function to replace an old statement with a new one. If you have already stored a statement under the name DEPT, you can still store the current statement under the same name by typing:

   replace

and pressing ENTER.

If you do not want to replace the previously stored statement, simply type:

   end

Press ENTER.

The END command returns you to the ISQL environment.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]