logo  
Google
 

DB2 SQL-Error: -206

SQLState: 42703

Short Description: IS NOT VALID IN THE CONTEXT WHERE IT IS USED

name is not valid in the context where it was specified. This error can occur for the following situations: v The specified column is not a column of any of the source or target tables or views of the statement. – In a SELECT or DELETE statement, the specified column is not a column of any of the tables or views that are identified in a FROM clause in the statement. – A column list of an SQL data change statement specified the name of a column of the target table or view of the statement.v A VALUES clause of an SQL data change statement specified the name of a column of the target table. v The left side of an assignment clause of an SQL data change statement specified a column that is not a column of the target table or view of the statement, or an INCLUDE column defined for the statement. For a DELETE statement, the target of an assignment clause can only be an INCLUDE column. v The right side of an assignment clause of an SQL data change statement referenced an INCLUDE column for expression. A column defined in an INCLUDE clause can only be specified on the left side of an assignment in an SQL data change statement. v A column defined in the INCLUDE clause of an UPDATE or DELETE statement was referenced in the WHERE clause of that statement. v A qualified column name was specified, but the table designator that is specified as the qualifier is not defined in this context. v For a GROUP BY clause, a correlated reference to a column was specified for a grouping expression, which is not allowed. v For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. v A correlated reference to a column was specified in an OLAP specification. Each column name that is referenced in an OLAP specification must unambiguously reference a column of the result table of the subselect that contains the OLAP specification. v For a CREATE TRIGGER statement, – A reference is made to a column using an OLD or NEW correlation name. The column name is not defined in the triggering table. – The left side of an assignment in the SET transition-variable statement in the triggered action specified an old transition-variable that is not valid for the type of trigger. – The reference name does not resolve to the name of a column or transition-variable.System action: The statement cannot be processed. Programmer response: Verify that the column and table designators are specified correctly in the SQL statement. In the case of a SELECT statement, verify that all of the required tables or views were named in the FROM clause. If the column was intended to be a correlated reference, qualify the column with the correct table designator. For an ORDER BY clause, ensure that there are no correlated column references. In the case of a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left side of assignments in a SET transition-variable statement and that any reference to columns of the triggering table are qualified with a transition-variable correlation name. For a DELETE statement, ensure that only columns defined in the INCLUDE clause are specified on the left side of assignments.

 <-  BACK TO INDEX