Assume you have created an SQL UDF named value_expression. The following example updates table t1 using the result of value_expression when it is passed values for columns a1 and b1 to update columns a1 and b1 for rows where the invocation of value_expression using the values for columns c1 and d1 are greater than 5.
UPDATE t1 SET b1 = test.value_expression(t1.a1, t1.b1) WHERE test.value_expression(t1.c1, t1.d1) > 5;