XDBC with SQL , error using too many OR 's

0 Likes

Problem:

An error is recieved when there are 128 or more OR's in the SQL query be submitted to AcuXDBC.

The error message is:

Internal Error : CGE O OP: Too many OR 's

and gives the line number producing the Error.

Resolution:

The limits for the AcuXDBC SQL processor are:

128 ORs

512 ANDs

The resolution is to use a range in the query using the WHERE, e.g.:

select * from table_name

where column_name is >= 1 or column_name is <=200

instead of:

select * from table_name

where column_name is = 1 or column_name is = 2 or column_name is = 3 ...

and so on until the error is encountered.  Changing the query to the first type will also have a beneficial performance impact and is a more well formed query than the problematic query.

Old KB# 3153
Comment List
Anonymous
Related Discussions
Recommended