SQL0490N | Number "<number>" directly specified in an SQL statement is outside the range of allowable values in this context ("<minval>", "<maxval>") |
Explanation: A number ("<number>") was specified that is not valid in the context in |which it was specified. The minimum allowed value in this context is |"<minval>". The maximum allowed value in this context is |"<maxval>". n must be within the range specified by "<minval>" |and "<maxval>" ("<minval>" =< n =< "<maxval>").
|User Response: Change the value n to a valid value in the statement.
|sqlcode: -490
|sqlstate: 428B7
SQL20214N | ORDER OF "<table-designator>" was specified. But this table-designator is not ordered. |
Explanation: The ORDER OF clause specifies the ordering of the result table based on the |order of "<table-designator>", which is not ordered. There is no |ORDER BY clause on the query associated with "<table-designator>", or the |sort key of the ORDER BY clause is a constant expression.
|User Response: Add a valid ORDER BY cause to the query associated with |"<table-designator>", or use a sort-key specification instead of using the |ORDER OF clause.
|sqlcode: -20210
|sqlstate: 428FI
SQL20211N | The specification ORDER BY and FETCH FIRST n ROWS ONLY is invalid. |
Explanation: An ORDER BY or FETCH FIRST n ROWS ONLY is not allowed in: |
|User Response: Remove the ORDER BY or FETCH FIRST n ROWS ONLY clause. An ORDER BY can |only be used in a query that uses the view, summary table, or SQL table |function. The effect of FETCH FIRST n ROWS ONLY can be created by using |the ROW_NUMBER() OVER() clause in conjunction with a predicate in the WHERE |clause. For example:
|SELECT name FROM | (SELECT ROW_NUMBER() OVER() AS rn name FROM emp) AS e WHERE rn<10 |
|sqlcode: -20211
|sqlstate: 428FJ
|
|Table 15. New SQLSTATE Messages
SQLSTATE Value | Meaning |
428B7 | A number specified in an SQL statement is out of the valid range. |
428FI | ORDER OF was specified, but the table-designator does not contain an ORDER BY clause. |
428FJ | ORDER BY is not allowed in the outer fullselect of a view or summary table. |