You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT src.PERIOD, CASE WHEN src.STARTX = 21 THEN 1 ELSE 0 END AS X, SUM(src.STAR) as STAR
FROM l2.V_TECH_EX_STAR src
WHERE src.PERIOD = '2021-05-01'
GROUP BY src.PERIOD, CASE WHEN src.STARTX = 21 THEN 1 ELSE 0 END
HAVING SUM(src.STAR) > 0
when parsing is done in TSQLSelectStatement is TSQLHavingClause null and part of having code is in TSQLGroupByClause. I expected it to be in TSQLHavingClause.
When i use same select without case in group by it works OK. So it's something with case part.
I updated from version 1.5.3 to 2.6.0 (in 1.5.3 works OK)
Thanks
The text was updated successfully, but these errors were encountered:
I found a similar problem in other example, but this is not with having clause, but with group by and order by clause.
SELECT src.USER_CODE,
ben.BENCHMARK_MTD, -- not show
src.COEF_OFF_DEF,
ben.BENCHMARK,
ben.BENCHMARK * src.COEF_OFF_DEF AS BENCHMARK_OFF_DEF,
sum(src.FLAG_FULL) AS PLANNED_MONTH
FROM CALENDAR src
JOIN (
SELECT COUNT(*) AS BENCHMARK, sum(CASE WHEN cal.DATE_DAY < CAST(GETDATE() AS DATE) THEN 1 ELSE 0 END) AS BENCHMARK_MTD
FROM D_CALENDAR cal
JOIN V_PERIOD_ACT act ON cal.DATE_DAY BETWEEN act.FIRST_DATE AND act.LAST_DATE
WHERE 1 = 1
AND cal.WORKING_DAY = 1
AND cal.WEEK_DAY <> 5
) ben ON 1 = 1
GROUP BY src.USER_CODE, ben.BENCHMARK, ben.BENCHMARK_MTD, src.COEF_OFF_DEF
ORDER BY src.USER_CODE ASC
TSQLGroupByClause and TSQLOrderByClause is null and group by and order by part is in TSQLFromClause. I expected it to be in TSQLGroupByClause and TSQLOrderByClause.
Hi, i have sql input:
when parsing is done in TSQLSelectStatement is TSQLHavingClause null and part of having code is in TSQLGroupByClause. I expected it to be in TSQLHavingClause.
When i use same select without case in group by it works OK. So it's something with case part.
I updated from version 1.5.3 to 2.6.0 (in 1.5.3 works OK)
Thanks
The text was updated successfully, but these errors were encountered: