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
References to column "default" value for DML operations [CORE6311] #6552
Comments
Commented by: Sean Leyne (seanleyne) The problem is not restricted to MERGE operations, it would apply to all Data Manipulation Language (DML) operations, such as INSERT or UPDATE. |
Modified by: Sean Leyne (seanleyne)summary: merge and default => References to column "default" value for DML operations |
Commented by: Sean Leyne (seanleyne) Please provide details on the "problem", it the engine rejecting the SQL? It the outcome of the operation not what you expect? |
Commented by: Orhan Turhan (bibilen) if, insert (name) values (default) -- no problem if, insert (name) values (iif(0=0, default, name)) -- problem |
Commented by: @mrotteveel You can't use default like that. It can only be used immediately in the value list, it cannot be used in an expression. |
Commented by: Orhan Turhan (bibilen) I think it should can be useable but this only my idea, you are the boss. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Orhan Turhan (bibilen)
merge into table
using log on http://table.id = http://log.id
when matched then
update set name = http://log.name
when not matched then
-- insert (name) values (default) -- no problem
insert (name) values (iif(0=0, default, name)) -- problem
The text was updated successfully, but these errors were encountered: