Issue Details (XML | Word | Printable)

Key: CORE-2005
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Nikolay Samofatov
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Support SQL 2008 syntax for MERGE statement with DELETE extension

Created: 18/Jul/08 04:17 PM   Updated: 28/Sep/15 01:11 PM
Component/s: Engine
Affects Version/s: 2.1.0
Fix Version/s: 3.0 Alpha 1

Issue Links:
Duplicate
 
Relate
 

QA Status: Done successfully


 Description  « Hide
Merge statement is designed to simplify/optimize final step of ETL processing for data warehousing, but when I tried to use it, I found that existing Firebird implementation is nearly impossible to use for this purpose.
In the situation when source data is mostly unchanged Firebird's MERGE logic triggers expensive row updates and recalculation of aggregates for unchanged rows.

The request is to implement SQL2008 MERGE syntax with DELETE extension:

<merge statement> ::=
MERGE INTO <target table> [ [ AS ] <merge correlation name> ]
USING <table reference>
ON <search condition> <merge operation specification>

<merge correlation name> ::=
<correlation name>

<merge operation specification> ::=
<merge when clause>...

<merge when clause> ::=
<merge when matched clause>
| <merge when not matched clause>

<merge when matched clause> ::=
WHEN MATCHED [ AND <search condition> ]
THEN <merge update specification>

<merge when not matched clause> ::=
WHEN NOT MATCHED [ AND <search condition> ]
THEN <merge insert specification>

<merge update specification> ::=
UPDATE ...
| DELETE

DELETE is the useful extension to standard MERGE syntax supported by DB2.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov made changes - 27/Jul/08 06:02 PM
Field Original Value New Value
Summary Support SQL 2008 syntax for MERGE statment Support SQL 2008 syntax for MERGE statement
Dmitry Yemanov made changes - 19/Oct/09 07:00 PM
Assignee Adriano dos Santos Fernandes [ asfernandes ]
Adriano dos Santos Fernandes made changes - 23/Mar/10 04:06 PM
Summary Support SQL 2008 syntax for MERGE statement Support SQL 2008 syntax for MERGE statement with DELETE extension
Adriano dos Santos Fernandes made changes - 23/Mar/10 04:06 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0 Alpha 1 [ 10331 ]
Resolution Fixed [ 1 ]
Adriano dos Santos Fernandes made changes - 08/Sep/10 12:14 PM
Link This issue is duplicated by CORE-3128 [ CORE-3128 ]
Pavel Zotov made changes - 28/May/15 04:30 PM
Status Resolved [ 5 ] Resolved [ 5 ]
QA Status Done successfully
Pavel Cisar made changes - 28/Sep/15 01:11 PM
Link This issue is related to QA-631 [ QA-631 ]