HPE NonStop SQL/MX Error – 6004 The metadata table HISTOGRAM_INTERVALS for column clumn does not have intervals interval_number #1 and interval_number #2 in order. If you have manually modified the metadata table, you should undo your changes using the CLEAR option in UPDATE STATISTICS and regenerate the statistics.

In this blog post, let’s learn about the error message “6004 The metadata table HISTOGRAM_INTERVALS for column clumn does not have intervals interval_number #1 and interval_number #2 in order. If you have manually modified the metadata table, you should undo your changes using the CLEAR option in UPDATE STATISTICS and regenerate the statistics.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

6004 The metadata table HISTOGRAM_INTERVALS for column clumn does not have intervals interval_number #1 and interval_number #2 in order. If you have manually modified the metadata table, you should undo your changes using the CLEAR option in UPDATE STATISTICS and regenerate the statistics.

Reason for the Error

You manually modified the metadata table and it now contains an invalid boundary value.

Solution

Undo your changes using the CLEAR option in UPDATE STATISTICS and regenerate the statistics