Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
PROCESS_TIME. In this example, "212" has been specified for host variable PRODNO, and "15" has
been specified for host variable ORDERQTY.
INSERT INTO STOCKS.DAILY_ORDER (CUSTOMER, PRODNO, ORDERQTY, PROCESS_TIME)
VALUES (61, :PRODNO, :ORDERQTY, CURRENT_TIME)
[Figure: Adding data using the current time]
3.1.4 Adding data from another table
Depending on the processing performed by the application program, data may need to be fetched from one table and
added to another. In such cases, processing is not very efficient if a single row SELECT statement or a cursor is used
to fetch and add data. To improve efficiency, an INSERT statement can be used to add data from one table to another
table. Use a query specification to fetch data to be added from a table. The following is an example of a query
specification:
Example 1:
In this example, the row for PRODUCT TELEVISION is added to table STOCK2 table from the STOCK
table.
25