After specifying that you want to add or modify a user-defined method with a customized SQL statement (see Add User-Defined Methods or Modify User-Defined Methods on how to do this), you perform the following steps in the Customized SQL Statement notebook:
UPDATE EMPLOYEE SET SALARY=?, BONUS=? WHERE EMPNO=?
Use %QUAL% to specify that a run-time qualifier for the table is used when executing the SQL query. For example, enter this SQL statement:
UPDATE %QUAL%EMPLOYEE SET SALARY=?, BONUS=? WHERE EMPNO=?
The default value of %QUAL% is the qualifier in the mapping's properties notebook. At run time, use the setQualifier method to set the value of %QUAL%.
Warning! If you are using DB2, the following lines must be in the DB2CLI.INI file in the SQLLIB directory, or else the validate action will return without an error message regardless of the SQL statement's actual validity:
[common] DEFERREDPREPARE=0
![]()
Modify User-Defined Methods
Copy User-Defined Methods
Delete User-Defined Methods
![]()
Support for Non-Nullable Columns with Default Values
Sample: Create and Use a User-Defined Method With
Customized SQL Statement
