HPE NonStop SQL/MX Error – 4110 The query contains sequence functions but no SEQUENCE BY clause: name.

In this blog post, let’s learn about the error message “4110 The query contains sequence functions but no SEQUENCE BY clause: name.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

4110 The query contains sequence functions but no SEQUENCE BY clause: name.

Reason for the Error

You specified a query that contains a sequence function name but no SEQUENCE BY clause, which is not supported. The value of the sequence function depends on the specific sequence (order) of the rows. If no sequence is defined, the result of the sequence function is dependent on an arbitrary ordering of the rows, which could lead to unexpected results.

Solution

Correct the syntax and resubmit. For example:

>>select runningsum(a) from t1;
*** ERROR[4110] The query contains sequence functions but no SEQUENCE BY clause: RUNNINGSUM(CAT.SCH.T1.A).

To correct the query, add a SEQUENCE BY clause:

>>select runningsum(a) from t1 sequence by b

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, let’s learn about the error message “1104 Default value string is too long for column column-name.”...
  • Data
  • December 3, 2024
In this blog post, let’s learn about the error message “3165 The precision or exponent value specified in value was...
  • Data
  • December 3, 2024
In this blog post, let’s learn about the error message “2051 Either control optionoption name or value ‘value’is not valid.”...
  • Data
  • December 3, 2024