DB2의 레코드를 업데이트하기 위해이 업데이트 문을 작성했습니다.여러 레코드가 내부 조인 DB2가있는 열로 업데이트됩니다.
UPDATE schemaname.tablename
SET fillerinfo = myfillerinfo
FROM schemaname.tablename,schemaname.tablename1
WHERE ID = uid1
AND PID=uuplanid
AND ACCTNO=uacctno
그러나 AS400 DB2에서 실행 중일 때. 내가 500K 기록이 위와 같이
Table1 | Table2
fillerinfo |myfillerinfo
-----------|-------------
A | b
c | D
E | f
:
는이 같은 데이터가 있습니다.
표시 오류 : 명령문을 실행할 수 없습니다.
내가 갖는 오류 : 위의 링크에서이 예제는 하나의 레코드를 업데이트 표시되고, https://oscarvalles.wordpress.com/2013/05/12/db2-update-with-inner-joins/
을하지만 :
그래서 내가 도움이된다면 보려면이 링크를 주심을.Keyword FROM not expected. Valid tokens: USE SKIP WAIT WITH WHERE. Cause . . . . . : The keyword FROM was not expected here. A syntax error was detected at keyword FROM. The partial list of valid tokens is USE SKIP WAIT WITH WHERE. This list assumes that the statement is correct up to the unexpected keyword. The error may be earlier in the statement but the syntax of the statement seems to be valid up to this point. Recovery . . . : Examine the SQL statement in the area of the specified keyword. A colon or SQL delimiter may be missing. SQL requires reserved words to be delimited when they are used as a name. Correct the SQL statement and try the request again.
조인을 사용하여 열의 여러 레코드를 어떻게 업데이트 할 수 있습니까? 제발 제안 해주세요.
가능한 경우 테이블 구조 및 샘플 데이터와 같은 세부 정보 추가 –