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
SELECTCOUNT(*) count,
theme_name,
base_theme_name
FROM
(
SELECTx.theme_name,
(
SELECT
theme_name
FROM
(
SELECTe.theme_nameFROM
BASE_INFO e
WHEREe.THEME_CODE='3'ORDER BYe.VERSION*1DESC )
WHERE
rownum =1) base_theme_name,
FROM
BUSINESS_index x
WHERE1=1
)
GROUP BY
theme_name,
base_theme_name
给base_theme_name字段设置分组之后(纵向,排序为默认),实际执行的sql如下:
SELECTCOUNT(1) total
FROM
(
SELECTCOUNT(*) count,
theme_name,
base_theme_name
FROM
(
SELECTx.theme_name,
(
SELECT
theme_name
FROM
(
SELECTe.theme_nameFROM
BASE_INFO e
WHEREe.THEME_CODE='3'ORDER BY
base_theme_name, --这里多了一个别名参数,但原表中不存在该字段e.VERSION*1DESC )
WHERE
rownum =1) base_theme_name,
FROM
BUSINESS_index x
WHERE1=1
)
GROUP BY
theme_name,
base_theme_name
) temp_count
版本号:
1.7.6
问题描述:
在报表中给字段添加排序后,报sql语法错误
错误日志&截图:
默认配置的sql:
给base_theme_name字段设置分组之后(纵向,排序为默认),实际执行的sql如下:
在子查询中多了一个排序参数 base_theme_name,但这个参数是查询结果的别名,原表中并不存在这个字段,进而导致sql报错。
重现步骤:
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: