Closed Zheness closed 4 years ago
Hello,
There a is a wrong order of parenthesis when a use a "CASE" followed with an alias.
Here is my initial mySQL query:
SELECT bar.foo, (CASE WHEN bar.foz = 1 THEN "ok" WHEN bar.hello = "world" THEN 2 ELSE 42 END) as status FROM bar
The MagicQuery change the parenthesis order after the alias, making the query wrong.
Here is the result after build:
SELECT `bar`.`foo`, ( CASE WHEN `bar`.`foz` = 1 THEN "ok" WHEN `bar`.`hello` = "world" THEN 2 ELSE 42 END AS status) FROM `bar`
Let me know if you have questions.
This is already fixed in 1.4 (the issue is present in 1.3.0 only)
Hello,
There a is a wrong order of parenthesis when a use a "CASE" followed with an alias.
Here is my initial mySQL query:
The MagicQuery change the parenthesis order after the alias, making the query wrong.
Here is the result after build:
Let me know if you have questions.