From: Serge Rielau on
On 8/10/2010 3:18 AM, Hardy wrote:
> if I'm using the MERGE and want to return how many rows are updated
> and how many rows are inserted, the way of get-diagnotics/select-
> changed-table doesn't work. A direct way is just to split the
> statement to update and insert, return the affected count. or just
> use merge, and use the predicate to test the affected count.
>
> is there any good way to do that? or Merge just not a good choice
> here?
>
> Thanks.
Are you saying you want the "ratio" of INSERT vs UPDATE vs DELETE?
I can't think of any easy way. That's where SELECT FROM MERGE would come
in handy....some day,...


--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab