Issue Details (XML | Word | Printable)

Key: CORE-6311
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Orhan Turhan
Votes: 0
Watchers: 3

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

References to column "default" value for DML operations

Created: 19/May/20 10:05 PM   Updated: 21/May/20 07:55 PM
Component/s: Engine
Affects Version/s: 4.0 Beta 2
Fix Version/s: None

QA Status: No test

 Description  « Hide
merge into table
using log on =
when matched then
  update set name =
when not matched then
-- insert (name) values (default) -- no problem
  insert (name) values (iif(0=0, default, name)) -- problem

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sean Leyne added a comment - 19/May/20 10:35 PM - edited
The problem is not restricted to MERGE operations, it would apply to all Data Manipulation Language (DML) operations, such as INSERT or UPDATE.

Sean Leyne added a comment - 19/May/20 10:38 PM
Please provide details on the "problem", it the engine rejecting the SQL? It the outcome of the operation not what you expect?

Orhan Turhan added a comment - 20/May/20 09:34 AM
if, insert (name) values (default) -- no problem
if, insert (name) values (iif(0=0, default, name)) -- problem
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 8, column 48.

Mark Rotteveel added a comment - 20/May/20 11:27 AM
You can't use default like that. It can only be used immediately in the value list, it cannot be used in an expression.

Orhan Turhan added a comment - 21/May/20 06:36 PM
I think it should can be useable but this only my idea, you are the boss.