E1: BSFN: How to Use JDB_SETSELECTIONX with Multiple Parenthesis

(Doc ID 631509.1)

Last updated on MAY 30, 2017

Applies to:

JD Edwards EnterpriseOne Tools - Version 8.98 and later
Information in this document applies to any platform.
Checked for relevance on 18-Nov-2011


Goal

In C you can used parameter «nParen» :

zSelectF4106[i].nAndOr = JDEDB_ANDOR_AND;
zSelectF4106[i].nCmp = JDEDB_CMP_GE;

zSelectF4106[i].nParen = JDEDB_PAREN_CLOSE;
zSelectF4106[i].nParen = JDEDB_PAREN_OPEN;
zSelectF4106[i].nParen = JDEDB_PAREN_NONE;


With this feature I convert my Where Clause to :

WHERE ( (Condition1 AND Condition2 AND Condition3 AND Condition4 AND
Condition5) OR
   (Condition1 AND Condition2 AND Condition3 AND Condition6
AND Condition7) OR
   (Condition1 AND Condition2 AND Condition3 AND Condition8
AND Condition9) )


I want to use parenthesis to reduce the number of conditions in my where clause. In the real program condition1 + 2 + 3 are replace with 7 conditions and I have 4 sets of supplemental condition. This gives my 36 elements into my zSelect structures. I want to reduce it to 15 elements.

It generates a SQL like :

SELECT  *  FROM CSDDTA.F4106  WHERE  (  ( BPITM = 91.000000 AND BPICID = 526.000000 AND BPCRCD ='CAD' AND BPUOM = 'BT' AND BPEXDJ <> 170364 AND BPUPMJ <>103336 AND BPTDAY <> 125505.000000 AND BPEFTJ <= 104001 AND BPEXDJ >= 104001 )  OR       ( BPITM = 91.000000 AND BPICID = 526.000000 AND BPCRCD =
'CAD' AND BPUOM = 'BT' AND BPEXDJ <> 170364 AND BPUPMJ <>103336 AND BPTDAY <> 125505.000000 AND BPEFTJ >= 104001 AND BPEXDJ <= 170364 )  OR  ( BPITM = 91.000000 AND BPICID = 526.000000 AND BPCRCD ='CAD' AND BPUOM = 'BT' AND BPEXDJ <> 170364 AND BPUPMJ <>103336 AND BPTDAY <> 125505.000000 AND BPEFTJ <= 170364 AND BPEXDJ >= 170364 )  OR  ( BPITM = 91.000000 AND BPICID = 526.000000 AND BPCRCD = 'CAD' AND BPUOM = 'BT' AND BPEXDJ <> 170364 AND BPUPMJ <>
103336 AND BPTDAY <> 125505.000000 AND BPEFTJ <= 104001 AND BPEXDJ >= 170364 )  )  ORDER BY BPITM ASC,BPMCU ASC,BPLOCN ASC,BPLOTN ASC,BPAN8 ASC,BPLOTG ASC, BPFRMP ASC,BPCRCD ASC,BPUOM ASC,BPEXDJ ASC


Is it possible to use parenthesis to reduce the number of conditions in my where clause? Is there any documentation?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms