본문 바로가기
IT 자료

[DB2] NOT COLUMN OF INSERTED/UPDATED TABLE

by 성곤 2016. 2. 15.
반응형


DB2 에러


NOT COLUMN OF INSERTED/UPDATED TABLE, OR ANY TABLE IN A FROM CLAUSE



에러 처리 방법은....

그냥 우리가 컬럼 혹은 테이블을 잘못 사용한 경우다.


딱히 어려운 에러는 아니기 때문에 다시 한 번 컬럼과 테이블을 확인하면 잘못된 부분을 찾을 수 있다.




IBM Knowledge Center 공식 자료를 살펴보면 이런 내용이 있습니다.







출처 : IBM Knowledge Center(클릭하면 원문으로 이동합니다)



Explanation

This return code is used to report one of these errors:
  • In the case of an INSERT or UPDATE statement, or SELECT FROM INSERT or UPDATE statement, the specified column is not a column of the table or view that was specified as the object of the insert or update.
  • In the case a SELECT or DELETE statement, the specified column is not a column of any of the tables or views identified in a FROM clause in the statement.
  • There is a correlated reference in GROUP BY.
  • There is an unresolved qualified reference in HAVING.
  • In the case of a MERGE statement or SELECT from MERGE statement, the specified column is not a column in the target-table. Also, it is not a column specified in the include-columns clause.

System action

A valid plan or package will be created if no errors are detected. The statement is bound dynamically on each execution of the statement.

Programmer response

For better performance, rebind the plan or package after correcting the statement. To correct the statement, verify that the column and table names are specified correctly in the SQL statement. In the case of a SELECT statement, check to be sure that all of the required tables were named in the FROM clause.

SQLSTATE

01533



번역기를 돌려서 편하게 봅시다.


설명
이 리턴 코드는 다음 오류 중 하나를보고하는 데 사용됩니다.

    
INSERT 또는 UPDATE 문 또는 SELECT FROM INSERT 또는 UPDATE 문의 경우, 지정된 컬럼이 삽입 또는 갱신 오브젝트로 지정된 테이블 또는 뷰의 열이 아니다.
    
SELECT 또는 DELETE 문의 경우, 지정된 열이 문의 FROM 절에서 식별되는 테이블 또는 뷰 중 열에도 없다.
    
GROUP BY에 상관 참고가있다.
    
HAVING 속에 미해결 된 참조가있다.
    
MERGE 문 또는 SELECT FROM MERGE 문의 경우, 지정된 컬럼이 목표 테이블 컬럼이 아니다. 또한 내장 열 절에 지정된 열이 아니다.

시스템 처리

오류가 발견되지 않으면 유효한 플랜 또는 패키지가 작성됩니다. 문은 실행될 때마다 동적으로 바인딩됩니다.


프로그래머 응답

성능을 잘하기 위해서는 명령문을 정정 한 후, 계획 또는 패키지를 리 바인드하십시오. 명령문을 정정 할 때 열 이름과 테이블 이름이 SQL 문에 제대로 지정되어 있는지 확인하십시오. SELECT 문의 경우, 필요한 모든 테이블이 FROM 절에 지정되어 있는지 확인하십시오.


SQLSTATE

01533



반응형