Skip to content

Support for WHEN NOT MATCHED BY SOURCE for MERGE statement [CORE6448] #6681

@firebird-automations

Description

@firebird-automations

Submitted by: Leonardt (lxo)

It would be very useful to have the option "WHEN NOT MATCHED BY <SOURCE>/<TARGET>" for "MERGE statements".
Like for example in MSSQL.

Use case and example of how to use this in Firebird now without "WHEN NOT MATCHED BY <SOURCE>/<TARGET":
https://www.sql.ru/forum/1323218/merge-when-not-matched-by-source

I currently need this for mass copying.
When copying, I would like to take everything from the source, update matches, add new records and delete data not contained in the source from the target.

Without the merge statement I would first have to delete everything from the target and then insert it.
Or "Update or Insert "and then do a delete with "where not exists".

I see this new feature as very useful for such purposes. Therefore I don't understand why the request in a ticket was rejected years ago (CORE2515)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions