File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 402
402
and a unique index is present and a duplicate row is concurrently
403
403
inserted, then a uniqueness violation error is raised;
404
404
<command>MERGE</command> does not attempt to avoid such
405
- errors by evaluating <literal>MATCHED</literal> conditions.
405
+ errors by restarting evaluation of <literal>MATCHED</literal>
406
+ conditions.
406
407
</para>
407
408
408
409
<para>
Original file line number Diff line number Diff line change @@ -266,10 +266,6 @@ DELETE
266
266
filled with a default value, either its declared default value
267
267
or null if there is none.
268
268
</para>
269
- <para>
270
- If the expression for any column is not of the correct data type,
271
- automatic type conversion will be attempted.
272
- </para>
273
269
<para>
274
270
If <replaceable class="parameter">target_table_name</replaceable>
275
271
is a partitioned table, each row is routed to the appropriate partition
@@ -581,12 +577,12 @@ WHEN NOT MATCHED THEN
581
577
<programlisting>
582
578
MERGE INTO CustomerAccount CA
583
579
USING (Select CustomerId, TransactionValue From RecentTransactions) AS T
584
- ON CA.CustomerId = T.CustomerId
580
+ ON T.CustomerId = CA.CustomerId
581
+ WHEN MATCHED THEN
582
+ UPDATE SET Balance = Balance + TransactionValue;
585
583
WHEN NOT MATCHED THEN
586
584
INSERT (CustomerId, Balance)
587
585
VALUES (T.CustomerId, T.TransactionValue)
588
- WHEN MATCHED THEN
589
- UPDATE SET Balance = Balance + TransactionValue;
590
586
</programlisting>
591
587
</para>
592
588
You can’t perform that action at this time.
0 commit comments