1
我有這個疑問,我正在嘗試引入非靜態值到PERCENTILE_CONT:PERCENTILE_CONT函數拋出錯誤
SELECT perf2.REVIEW_PERIOD
, PERCENTILE_CONT(goalsASP.GOAL*.01) WITHIN GROUP (ORDER BY AVG_AMT ASC) ast75
FROM repDB.TBL_PERFORMANCE perf2 JOIN
pz.CATEGORY C on perf2.DEPTCAT = C.id JOIN
repDB.TBL_GOALS_MATRIX goalsASP ON C.NAME = goalsASP.DIMENSION_Y
and perf2.REVIEW_PERIOD = goalsASP.SNAP_NAME
and goalsASP.DIMENSION_X = 'asp'
GROUP BY perf2.REVIEW_PERIOD
拋出的錯誤是:
ORA-30497: Argument should be a constant or a function of expressions in GROUP BY. 30497. 00000 - "Argument should be a constant or a function of expressions in GROUP BY."
這是一個查看,它工作正常時goalsASP.GOAL*.01
.75
.75
和我有一個存儲過程中提供一個列作爲參數工作得很好,所以我有點在我在這裏做錯了一種損失。