0
작동하지 않습니다에서오라클 SQL 상관 된 하위 쿼리 내 다음 문 뭐가 잘못
ORA-00904: "TableToUpdate"."Date": Ungültiger Bezeichner
: 내가 오라클에서 오류가 발생합니다 이것의 실행에
UPDATE TableToUpdate SET ColumnToUpdate = (
SELECT ColumnWithNewValues
FROM (
SELECT ColumnWithNewValues, ROWNUM AS N
FROM Table1 t1, Table2 t2 -- join tables
WHERE t2.Schluessel = t1.Schluessel -- join condition
AND t1.DateFrom <= TableToUpdate.Date -- <==== Error, reference to TableToUpdate
AND t1.DatumTo >= TableToUpdate.Date
-- ... some other conditions, not important here ...
) tmp
WHERE tmp.N = 5 -- Use the fifth row to update the row of TableToUpdate
)
영어이게 무슨 뜻인지 알 것 같아.
ORA-00904: "TableToUpdate"."Date": Invalid identifier
그래서 내가 상관 subquer에서 TableToUpdate를 참조 할 수없는 것 같습니다 SELECT 문에서 y. MSSQL에서는 oracle 특정 ROWNUM을 으로 바꾸는 대신 동일한 기술을 사용합니다.
나를 도와 줄 사람이 있습니까?