Page 1 of 1

RunQuery JDE Parameters Error

Posted: March 9th, 2022, 10:41 pm
by JefferyD
When configuring a RunQuery service for a JDE query with parameters (:Param), it errors if the number of parameters defined doesn't match the number of parameters in the query.
RunQuery Unused Parameter.PNG
RunQuery Unused Parameter.PNG (97.33 KiB) Viewed 508 times
RunQuery Unused Parameter.PNG
RunQuery Unused Parameter.PNG (97.33 KiB) Viewed 508 times

Would it be feasible to have the parameters in the query automatically mapped to the defined parameters so that it functions more like MSSQL parameters (@Param) and thus easier to maintain?
For example, given param1, param2, and param3, have param1 and param3 mapped twice while param2 is excluded from the below query.

Code: Select all

SELECT *
FROM TESTDTA.F0101
WHERE (ABAN8 = :param1 OR ABAN81 = :param1)
AND ABALPH = :param3
AND ABALP1 != :param3

Re: RunQuery JDE Parameters Error

Posted: March 10th, 2022, 8:53 am
by SteveCap
This does not not have to do with JDE rather that it is an Oracle database which requires your parameters to match up. In order to determine what parameters are needed/not needed we would have to parse your query ourselves which is something we are going to want to avoid.

Re: RunQuery JDE Parameters Error

Posted: April 26th, 2023, 11:15 am
by JustinVanRegenmorter
To match up parameters in a situation like this we recommend using the ParametersXML node along with xsl ifs/chooses to decide which parameters are created/used.