[
https://issues.apache.org/jira/browse/DERBY-495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741904#action_12741904
]
Kim Haase commented on DERBY-495:
---------------------------------
Dag Wanvik has answered the questions that seemed to be holding up the
resolution of this issue.
> > Neither COALESCE nor VALUE is documented currently (except for a
> > mention in an error message).
> >
> > Looking at DERBY-495, it appears that the doc effort stalled for lack
> > of answers to a couple questions --
> >
> > I gather VALUE as a synonym of COALESCE is not in the SQL standard,
> > but COALESCE itself is? Should we mention VALUE, then?
Yes, since it is implemented we should document it as a synonym, but
probably recommend the standard form COALESCE.
> >
> > What does the SQL standard say about the one-argument form? Is it
> > permitted?
The standard does not allow the one-argument form:
SQL 2003, vol 2 section 6.1 <case expression>:
:
<case abbreviation> ::=
NULLIF <left paren> <value expression> <comma> <value expression> <right
paren>
| COALESCE <left paren> <value expression> { <comma> <value expression> }...
<right paren>
This means that 2 or more args are allowed.
Derby does not permit one argument; it throws 42605. Also, not all arguments
can be dynamic (?), if so Derby throws 42610.
> COALESCE
> --------
>
> Key: DERBY-495
> URL: https://issues.apache.org/jira/browse/DERBY-495
> Project: Derby
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 10.0.2.0
> Environment: n/a
> Reporter: Paul Jenkins
> Assignee: Kim Haase
> Priority: Minor
>
> The COALESCE function has been implemeted since 10.0.2.0 (at least) but isn't
> documented.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.