我有類似下面的查詢,無法在組中添加子查詢表達 - 甲骨文
select a,b,c, (select h from table 1 where field = a and field2 = b) as alias_column, d
from table
group by a,b,c, (select h from table 1 where field = a and field2 = b) , d
我越來越喜歡錯誤,
ORA-22818: subquery expressions not allowed here
22818. 00000 - "subquery expressions not allowed here"
*Cause: An attempt was made to use a subquery expression where these
are not supported.
*Action: Rewrite the statement without the subquery expression.
Error at Line: 84 Column: 2
我想這是因爲在子查詢where clause
那被添加在group by
查看子查詢(select * from table 1 where field = a and field2 = b)
有a
和b
字段從父ta BLE。
請幫忙。
嘗試更換子查詢在組alias_column – Uriil
它不工作..當我谷歌它說,我必須把所有的子查詢組 – Sahal
有多個表加入子查詢。我在問題中沒有提到這一點。 – Sahal