[ https://issues.apache.org/jira/browse/DERBY-1576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13992572#comment-13992572 ]
Knut Anders Hatlen commented on DERBY-1576: ------------------------------------------- There is also a difference between the simple case syntax in SQL:2003 and SQL:2011. In the SQL:2003 standard, a <simple when clause> can only have one <when operand>, whereas SQL:2011 allows the <simple when clause> to contain a <when operand list>. The example I gave in my 30/Apr/14 comment, used the 2011 syntax. I agree that it would be fine to only implement the SQL:1999 syntax in this issue, as that would be a useful improvement on its own, and that's the version of the standard specified in the original request. > Extend the CASE expression syntax for "simple case" > --------------------------------------------------- > > Key: DERBY-1576 > URL: https://issues.apache.org/jira/browse/DERBY-1576 > Project: Derby > Issue Type: Improvement > Components: SQL > Reporter: Christian d'Heureuse > Priority: Minor > Labels: derby_triage10_11 > Attachments: simple-simple.diff > > > The ISO/IEC 9075-2:1999 SQL standard describes two kinds of CASE expressions: > "simple case" and "searched case". > The current Derby version supports "searched case" but not "simple case". > The syntax for "simple case" is: > CASE Expression > WHEN Expression THEN Expression > [ WHEN Expression THEN Expression ] > ... > ELSE ElseExpression > END > Example: > VALUES > CASE 4 > WHEN 1 THEN 'one' > WHEN 2 THEN 'two' > WHEN 3 THEN 'three' > ELSE 'many' > END -- This message was sent by Atlassian JIRA (v6.2#6252)