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 client error message “EngineNotSupported with HTTP Status 400” when working with PolarDB...
  • Data
  • December 15, 2022
In this blog post, let’s learn about the client error message “EngineVersionNotSupported with HTTP Status 400” when working with PolarDB...
  • Data
  • December 15, 2022
In this blog post, let’s learn about the client error message “IncorrectDBClusterLockMode with HTTP Status 400” when working with PolarDB...
  • Data
  • December 15, 2022