6852 PARTITIONS WHERE clause needs to be simplified
The user is trying to perform an archive or restore operation of selected partitions but the PARTITIONS WHERE condition defining the partitions selected all the partitions. Or, if the ALL PARTITIONS clause was specified for a restore, the well-defined bounding condition from the archive is not compatible with the current partitioning of the table. This can happen if the condition references columns that are not partitioning columns or if the condition is not compatible with the current partitioning of the table. For ALL PARTITIONS , even if the bounding condition is well-defined, this error may occur if the partitioning of the table has changed significantly due to altering of the partitioning. This error may also occur if the user is trying to perform a selected partitions archive or restore operation of a PPI table having one or more TIMESTAMP partitioning columns.
If you specified ALL PARTITIONS, resubmit specifying an appropriate condition in a PARTITIONS WHERE clause. If you specified a PARTITIONS WHERE condition, you may need to rewrite the condition to be simpler such that is selects the desired partitions. You can try "hard-coding" the PARTITIONS WHERE option by using the system-derived PARTITION column. Experiment with EXPLAINs of a simple SELECT query using various WHERE condition formulations and when you have something that will only scan a limited number of partitions, re-submit the job. Alternatively, you can always resort to full-table archive or restore by removing the PARTITIONS WHERE option; if doing a restore, you may want to restore into a staging table, delete desired rows from the target table, and then insert-select the appropriate rows into the target table.