RunQuery JDE Parameters Error

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

RunQuery JDE Parameters Error

Unread post 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 1735 times
RunQuery Unused Parameter.PNG
RunQuery Unused Parameter.PNG (97.33 KiB) Viewed 1735 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
word count: 120

Tags:
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: RunQuery JDE Parameters Error

Unread post 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.
word count: 51
JustinVanRegenmorter
Posts: 576
Joined: August 26th, 2021, 9:56 am
Contact:

Re: RunQuery JDE Parameters Error

Unread post 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.
word count: 27
Post Reply