Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1575

document full syntax of CASE expression

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.2.1.6, 10.3.1.4
    • Documentation
    • None

    Description

      The documentation at http://db.apache.org/derby/docs/dev/ref/rrefcasenullif.html describes the CASE expression syntax as:

      CASE WHEN BooleanExpression THEN thenExpression ELSE elseExpression END

      But the CASE expression supports more than one WHEN/THEN clauses.
      I suggest to change the syntax description to:

      CASE
      WHEN BooleanExpression THEN Expression
      [ WHEN BooleanExpression THEN Expression ]
      ...
      ELSE elseExpression
      END

      Example:

      VALUES
      CASE
      WHEN 1 = 2 THEN 3
      WHEN 4 = 5 THEN 6
      ELSE 7
      END

      Attachments

        1. DERBY-1575_fix.diff
          2 kB
          Camilla Haase
        2. DERBY-1575.diff
          2 kB
          Camilla Haase
        3. rrefcasenullif.html
          4 kB
          Camilla Haase

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            chaase3 Camilla Haase
            chdh@inventec.ch Christian d'Heureuse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment