1) What version/release of DB2 and platform are you using?
2) Did you showed exactly error messages and trigger?
I couldn't see "TO CONN_HIS"(in the error message) in your trigger.
3) You should read more carefully the syntax of DB2 SQL.
For example, some syntax flaws I found were...
(I saw "DB2 9.7 for LUW SQL Reference Volume 2".)
3-1) "SELECT CASE ... " has no FROM clause.
3-2) No (INSERT/DELETE)
statement is allowed inside (CASE)
expression, even if they are surrounded by parentheses.
3-3) Looking into syntax diagram of
triggered-action...
Quote:
triggered-action:
[WHEN ( search-condition )] [label:] SQL-procedure-statement
|
No multiple "WHEN (
search-condition ) SQL-procedure-statement" nor multiple "SQL-procedure-statements" are allowed as
triggered-action.
But, "Compound SQL" is included in "SQL-procedure-statement".
So, you might be able to specify multiple statements as an "SQL-procedure-statement" by surrounding then with BEGIN and END.