The Update Statement Dialog |
The UPDATE statement is opened from the connection dialog by creating a statement on a connection, refer to . Due to their similarity this dialog is shared for the UPDATE / INSERT and DELETE statements. We need to choose the required type from the selection at (1). |
|
![]() |
|
The update dialog is used to update existing column data in a data source. After selecting UPDATE we notice that all the tables and columns are shown (2) for the datasource of the connection used for this statement. We need to select a table to work with and also a column(s) to update. (as depicted by 3). Note: The columns selected for update cannot have criteria placed against them as they are being updated (4). The criteria is therefore enabled for the non-selected columns. The columns for updating are all updated separately with their respective data sets or static data. If the data used for updating is not the same size as the rows to be updated (selected via the criteria of the unselected columns) then a warning message is logged after the update. For example, if we specify that the column BALANCE is to be updated for all the IDs from 1-100, and we specify that a db-JAPI statement be used as the source of the update. Then if the statement produces less or more than 100 values (of type numeric) then a warning will be posted and the smallest set of data is updated in the BALANCE. In the image above we have specified that TYPE is to be updated. In the expression field we need to double click to bring up the dialog shown by (5). This allows us to specify the data to be used for the update. The data can come from another select statement (db-JAPI statement), from a Stored Procedure inside the datasource, a static value or no value. |
|
The Data-Set Popup | |
![]() |
The data source dialog on the left has a few capabilities worth mentioning. Firstly,
as mentioned earlier, it allows for data set selection from different types of sources
(1). In the image we see that the db-JAPI statement ACCOUNT (2) is selected
as the data provider in this case. Below that (3) we see that we can select the type of data to use for the update. This is useful in many cases when updating char types. Sometimes we need to choose a character set to correctly update the values if we are working with extended character set of non-english languages. There are two cases where this is definitely required. They are as follows:
|
![]() |