AnsweredAssumed Answered

Oracle SQL query to find values in preconditions.

Question asked by treal04 Employee on Dec 19, 2018
Latest reply on Apr 17, 2019 by treal04

Hi Automic and Oracle database experts,

 

I have a workflow with the following precondition:

 

 

Now I would need a query that shows all workflows containing 'set object variable 1 to 1'.

 

Here's what I have so far:

 

SELECT
jpov_oh_idnr,
oh_name,
jpov_jpp_lnr,
COUNT(jpov_jppo_lnr)
FROM
uc4.jpov
JOIN uc4.oh ON oh_idnr = jpov_oh_idnr
inner join jppo on jppo_oh_idnr = oh_idnr
WHERE
TO_CHAR(jpov_value) = '1'
and JPPO_CarName = 'SET VALUE'
GROUP BY
oh_name,
jpov_oh_idnr,
jpov_jpp_lnr
HAVING
COUNT(jpov_jppo_lnr) > 1;

The approach here is to look for more than one value '1' in the JPOV_JPPO_LNR, but this also shows other conditions like `return code = 1'.

 

Any help on getting this figure out is highly appreciated.

 

Cheers,

Alexander 

Outcomes