Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPLACE statement [CORE815] #1201

Closed
firebird-automations opened this issue Sep 17, 2003 · 9 comments
Closed

REPLACE statement [CORE815] #1201

firebird-automations opened this issue Sep 17, 2003 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pcisar

Is related to QA113
Replaces CORE2288

Votes: 2

SFID: 807955#⁠
Submitted By: pcisar

This statement would combine the functionality of the
INSERT and UPDATE statements. This is not a SQL
standard feature (in fact, I think Diane Brown will
have a stroke if she hear's about this) ;-)

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-08-25 19:20
Sender: danielrail
Logged In: YES
user_id=238419

In SQL-2003 standard, there's a new DML statement that has
been created just for this purpose. And, it's called MERGE.

Here's the syntax:
<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 THEN <merge update specification>

<merge when not matched clause> ::=
WHEN NOT MATCHED THEN <merge insert specification>

<merge update specification> ::= UPDATE SET <set clause
list>

<merge insert specification> ::=
INSERT [ <left paren> <insert column list> <right paren> ]
[ <override clause> ]
VALUES <merge insert value list>

<merge insert value list> ::=
<left paren>
<merge insert value element> [ { <comma> <merge insert
value element> }... ]
<right paren>

<merge insert value element> ::=
<value expression>
| <contextually typed value specification>

Now, there's a standard that can be followed to implement
this feature.

Daniel Rail

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.1 [ 10041 ]

SF_ID: 807955 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

SF_ID: 807955 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Fix Version: 2.1 Alpha 1 [ 10150 ]

SF_ID: 807955 =>

Fix Version: 2.1.0 [ 10041 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA113 [ QA113 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10839 ] => Firebird [ 15278 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Q/A tested ok

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue replaces CORE2288 [ CORE2288 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants