yzmSEwZs0252039 回复 CD20160914mysql的,现在可以了,但是我替换之后另一段sql的时候又报一样的错了,另一段单独摘出来是可以执行的,请问一下这是啥问题啊?
${if(type="当月","
select
case
when a.months = '2月' then "1-2月"
when a.months = '2月' then "1-2月"
when a.months = '3月' then "2-3月"
when a.months = '4月' then "3-4月"
else a.months
end months,
value1,
value2,
value3,
value4,
yoy,
mom
from
(
SELECT
CONCAT(MONTH (CONCAT(months, '-01')), '月') months,
value1,
value2 ,
value3 ,
value4,
yoy,
mom
FROM
test1.demo2
where type = '当月') a",
"select * FROM test1.demo2")}