>>-INPut----+-table_name-+---+---------------------------+----->< '-view_name--' | .-,-----------------. | | V | | '-(-----column_name--)---+--' |
INPUT is an ISQL command that enables you to insert several rows of data into a table or view.
INPUT is issued to identify the table, view, or column(s) where the data is inserted.
Successful execution of the INPUT command causes the column names and their data types to be displayed in the order in which the data must be typed. Data can then be typed one row at a time. Press the ENTER key after each row is typed.
When typing data:
'julie's book shop'
JULIE'S BOOK SHOP is inserted into the table.
G'so...si'
where so stands for shift-out character, si stands for shift-in character, and ... is graphic data (a DBCS character string).
Note: | You can use N' as a synonym for G' |
After you press ENTER for a row of data, the data is moved to the output area of the display and the input area is cleared so that another row of data can be typed. When all the data has been typed, type the END command to signify the end of input data.
With AUTOCOMMIT on, the data you type is not committed to the table until the INPUT command is ended by the END command or the END PF key (usually PF3). You can use the ISQL SAVE command to commit data in the table prior to typing an END command.
The SAVE command stores all data typed since the previous SAVE command or, if one had not been typed, since the start of the INPUT command. It has the same effect as the END command but lets you continue to type data.
In addition to storing data prior to ending an INPUT command, you can also prevent the storing of data typed since the last SAVE command or since the start of the INPUT command if no SAVE has been issued. You type the ISQL BACKOUT command instead of more data.
If AUTOCOMMIT is off, the data you type on an INPUT command is not committed to the table until you type a COMMIT command after ending the INPUT command. With AUTOCOMMIT off, the SAVE and BACKOUT commands have no effect.
The following illustrates how you can fill the ACTIVITY table by using the INPUT command:
input activity . . . 160,'ADMDB','Adm databases' . . . 100,'TEACH','Teach classes' end