You are on page 1of 2

Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.

Campaign Load Error: [nQSError: 42029] Subquery contains too many values for the IN
predicate. (Doc ID 980576.1)

In this Document

Symptoms
Cause
Solution

APPLIES TO:

Siebel Email Marketing Server - Version 7.8.2 SIA [19213] and later
Information in this document applies to any platform.
Checked for relevance on 3 June 2013

SYMPTOMS

The customer is encountering the following error message in campaign load while loading a segment:
"Error/Warning : Error invoking service 'Mktg Data Load Service', method 'CampaignLoad' at step 'Load Segment Tree
Cells/Segments'.(SBL-BPR-00162)
The SOAP request '15' to the Analytics Web server failed. For more information on the error, navigate to the Siebel Analytics
Web Administration > Manage Marketing Jobs console.

Detailed error message: Job request of type "WriteListFiles" failed. Error executing the list generation SQL. Error in executing
cursor for WorkNode (Id:0) Odbc driver returned an error (SQLExecDirect). State: S1000. Code: 10058. [NQODBC]
[SQL_STATE: S1000] [nQSError: 10058] A general error has occurred.

[nQSError: 42029] Subquery contains too many values for the IN predicate. (S1000) SQL Issued: SET VARIABLE
DISABLE_CACHE_HIT=1 , DISABLE_CACHE_SEED=1 :SELECT saw_0 saw_0, saw_1 saw_1, saw_2 saw_2, ⠦⠦DT (SBL-
MKT-00471).

CAUSE

Analytics/OBI Server builds the query for the target cell with a subquery where all the segmented contacts ids are put in the
IN statement.

Some databases will not accept a SQL statement with an IN list with more than 1000 or 10000 entries.

It is possible to bypass the Analytics/OBI error by increasing the following parameter in the NQSConfig.INI file

MAX_EXPANDED_SUBQUERY_PREDICATES = 50000; // default is 8192

But this causes a problem on an Oracle data source since there is a limitation on the number of argument (1000) you can pass
to the IN clause in Oracle

SOLUTION
Since there is no way to avoid the 1000 limit from the Oracle in this instance, the most viable workaround is to do the
processing on the Analytics/OBI Server rather than in the Oracle database.

The suggested workaround for this situation is to turn off the following parameter in the Siebel Analytics/OBI repository >
Physical layer > Database Properties > Features tab, to have the IN processing done on the Analytics server instead of the
RDBMS.

IN_SUPPORTED = OFF

When you do that, the MAX_EXPANDED_SUBQUERY_PREDICATES parameter from the NQSConfig.ini file will take over as the
maximum allowed in an IN list. This should be set on any database object in your repository that connects to Oracle as it is
Oracle that has the limit on number of items in an IN statement.

Some other options include:

Use EXISTS instead of IN when constructing a sub-query.

The effect of this is also to split the original query into two queries without using an IN clause

Didn't find what you are looking for?

You might also like