Title: Syntax error on keyword 'as' with case in a valid query · Issue #192 · phpmyadmin/sql-parser · GitHub
Open Graph Title: Syntax error on keyword 'as' with case in a valid query · Issue #192 · phpmyadmin/sql-parser
X Title: Syntax error on keyword 'as' with case in a valid query · Issue #192 · phpmyadmin/sql-parser
Description: Steps to reproduce The query SELECT c.nome, case c.id_estado when 1 then 12 when 2 then 27 when 3 then 13 when 4 then 16 when 5 then 29 when 6 then 23 when 7 then 53 when 8 then 32 when 9 then 52 when 10 then 21 when 11 then 31 when 12 t...
Open Graph Description: Steps to reproduce The query SELECT c.nome, case c.id_estado when 1 then 12 when 2 then 27 when 3 then 13 when 4 then 16 when 5 then 29 when 6 then 23 when 7 then 53 when 8 then 32 when 9 then 52 w...
X Description: Steps to reproduce The query SELECT c.nome, case c.id_estado when 1 then 12 when 2 then 27 when 3 then 13 when 4 then 16 when 5 then 29 when 6 then 23 when 7 then 53 when 8 then 32 when 9 then 52 w...
Opengraph URL: https://github.com/phpmyadmin/sql-parser/issues/192
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Syntax error on keyword 'as' with case in a valid query ","articleBody":"### Steps to reproduce\r\n\r\nThe query \r\n``` \r\nSELECT\r\nc.nome, \r\ncase c.id_estado\r\n when 1 then 12 \r\n when 2 then 27\r\n when 3 then 13 \r\n when 4 then 16 \r\n when 5 then 29\r\n when 6 then 23\r\n when 7 then 53 \r\n when 8 then 32 \r\n when 9 then 52 \r\n when 10 then 21\r\n when 11 then 31\r\n when 12 then 50 \r\n when 13 then 51\r\n when 14 then 15 \r\n when 15 then 25 \r\n when 16 then 26 \r\n when 17 then 22 \r\n when 18 then 41 \r\n when 19 then 33 \r\n when 20 then 24 \r\n when 21 then 11 \r\n when 22 then 14 \r\n when 23 then 43 \r\n when 24 then 42 \r\n when 25 then 28 \r\n when 26 then 35 \r\n when 27 then 17 \r\nend as teste,\r\nc.cod_municipio, cll.latitude, cll.longitude\r\nFROM cidade c\r\nINNER JOIN cidades_lat_long cll ON c.cod_municipio = cll.id_geocode\r\n```\r\n\r\nThe Structure\r\n\r\n```\r\nCREATE TABLE cidades_lat_long (\r\n id_geocode int(11) NOT NULL,\r\n latitude double NOT NULL,\r\n longitude double NOT NULL,\r\n PRIMARY KEY (id_geocode)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\r\nCREATE TABLE cidade (\r\n id int(11) NOT NULL AUTO_INCREMENT,\r\n nome varchar(45) NOT NULL,\r\n id_estado int(11) NOT NULL,\r\n cod_municipio int(11) DEFAULT NULL COMMENT 'CEP',\r\n PRIMARY KEY (`id`),\r\n KEY fk_cidade_estado(id_estado)\r\n) ENGINE=InnoDB AUTO_INCREMENT=10036 DEFAULT CHARSET=utf8;\r\n```\r\n\r\n\r\n\r\n### Server configuration\r\n**Operating system**:\r\nWindows 10\r\n\r\n**Web server:**\r\nLocalhost (with Apache and MYSQL, installed by WAMP)\r\n\r\n**PHP version:**\r\n5.6.31\r\n**phpMyAdmin version:**\r\n4.7.4\r\n\r\n### Client configuration\r\n**Browser:**\r\nOpera 52.0\r\n\r\n**Operating system:**\r\nWindows 10","author":{"url":"https://github.com/joaoggnogueira","@type":"Person","name":"joaoggnogueira"},"datePublished":"2018-05-16T14:26:52Z","url":"https://github.com/phpmyadmin/sql-parser/issues/192"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4e00fbb-38c2-e8e0-8e52-fc3aefd3ce02 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA50:14CE41:510752:71223B:6B0443AE |
| html-safe-nonce | 5fc324b5864d03806c386d960a6f0c299ffe82871e19ad8b7030513d3a074e77 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTUwOjE0Q0U0MTo1MTA3NTI6NzEyMjNCOjZCMDQ0M0FFIiwidmlzaXRvcl9pZCI6IjY0NjU5MTI4Mjc0MjAwOTk1MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 203b1047f9e527c6332420f2891724f1bc37bdf9d646adb2313a4f97479f84c1 |
| hovercard-subject-tag | issue:323645951 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpmyadmin/sql-parser/192/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fc7e30682ebc1161e05ade63e4d20db3c64daec6e15160089a312bd4b5437d7b/phpmyadmin/sql-parser/issues/192 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fc7e30682ebc1161e05ade63e4d20db3c64daec6e15160089a312bd4b5437d7b/phpmyadmin/sql-parser/issues/192 |
| og:image:alt | Steps to reproduce The query SELECT c.nome, case c.id_estado when 1 then 12 when 2 then 27 when 3 then 13 when 4 then 16 when 5 then 29 when 6 then 23 when 7 then 53 when 8 then 32 when 9 then 52 w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joaoggnogueira |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/phpmyadmin/sql-parser git https://github.com/phpmyadmin/sql-parser.git |
| octolytics-dimension-user_id | 1351977 |
| octolytics-dimension-user_login | phpmyadmin |
| octolytics-dimension-repository_id | 36256604 |
| octolytics-dimension-repository_nwo | phpmyadmin/sql-parser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36256604 |
| octolytics-dimension-repository_network_root_nwo | phpmyadmin/sql-parser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width