この例は、MERGEリクエスト内の何か所かでvalue_expressionというSQL UDFを呼び出す方法を示しています。
MERGE INTO t1 USING (SELECT a2, b2, c2 FROM t2 WHERE test.value_expression(b2, c2)) source_tbl(a2, b2, c2) ON a1 = source_tbl.a2 AND b1 = test.value_expression(source_tbl.b2, source_tbl.c2) WHEN MATCHED THEN UPDATE SET b1 = b2, c1 = test.value_expression(2,3) WHEN NOT MATCHED THEN INSERT (a2, test.value_expression(4,5), c2);