

SQL Codes › SQL Return Codes -1 through -999 › -109 - VIEW COLUMN CONTAINING EXPRESSION OR FUNCTION USED ILLEGALLY
-109 - VIEW COLUMN CONTAINING EXPRESSION OR FUNCTION USED ILLEGALLY
Reason:
A column of a view was referenced in a statement, and during the process of resolving this reference (to the query that defines the view) it was found that the view column consists of either an expression or a column function. It was also found that the use of the function or expression was inconsistent with the query that was being run. Some examples of this are:
- View column in WHERE clause resolves either to an expression that includes a column function or a column function alone, but column functions are invalid in a WHERE clause.
- View column that appears as an argument of a column function resolves to a column function itself or an expression containing a column function.
- View column that appears as an argument of a column function with DISTINCT specified on the argument to the function, that is: function(DISTINCT view-column), resolves to an expression.
- View column referenced in any of the above situations resolves directly or indirectly to an expression or function in an underlying view, and this expression or function causes one of the above situations to occur.
- View column referenced in GROUP BY resolves to expression or function.
The SQLSTATE that equates to this SQL return code is 0AS01.
Action:
Alter the query to reference the view column legally, or create a new view that satisfies the requirements of the query without violating any rules.
Copyright © 2015 CA Technologies.
All rights reserved.
 
|
|