Expand|Select|Wrap|Line Numbers
- CREATE FUNCTION add_data_audit (tableName Varchar(100),oldValue Varchar(500),newValue Varchar(500),fieldName Varchar(200),userName Varchar(15),ipAddress Varchar(5),modifiedDate Date,auditableId bigint)
- RETURNS BOOLEAN
- NO EXTERNAL ACTION
- NOT DETERMINISTIC
- LANGUAGE SQL
- F1: BEGIN ATOMIC
- -- #######################################################################
- -- # Specify the SQL you want to execute by replacing the text within the
- -- # [brackets] with your SQL. There are several ways to do this:
- -- # * Enter your SQL directly, or
- -- # * Cut and paste your SQL, or
- -- # * Right-click in the editor window and select Insert from File...
- -- # Note: Be sure to end the statement with the terminator (usually ';')
- -- # Example: SELECT COUNT(*) FROM SYSIBM.SYSTABLES;
- -- ######################################################################
- INSERT INTO data_audit_infos(
- organization_id, field_name, new_value, old_value, table_name,
- user_name, ip_address, modified_date,auditable_id)
- VALUES ( userName, fieldName,newValue, oldValue, tableName,
- userName, ipAddress, modifiedDate, auditableId);
- RETURN true;
- END
Create user-defined function returns SQLCODE: -374, SQLSTATE: 428C2.
ADMIN.ADD_DATA_AUDIT: 24: The "MODIFIES SQL DATA" clause has not been specified in the CREATE FUNCTION statement for LANGUAGE SQL function "ADMIN.ADD_DATA_AUDIT" but an examination of the function body reveals that it should be specified.. SQLCODE=-374, SQLSTATE=428C2, DRIVER=3.62.80
The "MODIFIES SQL DATA" clause has not been specified in the CREATE FUNCTION statement for LANGUAGE SQL function "ADMIN.ADD_DATA_AUDIT" but an examination of the function body reveals that it should be specified.. SQLCODE=-374, SQLSTATE=428C2, DRIVER=3.62.80
ADMIN.ADD_DATA_AUDIT - Deploy failed