[MDEV-23940] Docu bug in CASE Statement Created: 2020-10-12 Updated: 2020-10-12 Resolved: 2020-10-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oli Sennhauser | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | CASE, sql, syntax, | ||
| Environment: |
n.a. |
||
| Description |
|
I would say you have a docu bug here (first example): END CASE -> END only SQL> SELECT CASE ROUND(RAND()*3, 0) WHEN 1 THEN 'Value 1' WHEN 2 THEN 'Value 2' WHEN 3 THEN 'Value 2' ELSE 'All other values' END CASE; SQL> SELECT CASE ROUND(RAND()*3, 0) WHEN 1 THEN 'Value 1' WHEN 2 THEN 'Value 2' WHEN 3 THEN 'Value 2' ELSE 'All other values' END ;---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------- Possibly a Copy/Paste error from other source? |
| Comments |
| Comment by Ian Gilfillan [ 2020-10-12 ] |
|
I think you were looking for https://mariadb.com/kb/en/case-operator/. I've adjusted the text to reduce the chances of confusion. |