Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: timonkRaylee,
Here is one method you could use.
I modified my original example to include a basic parameter:
####
sqlNonSelect("CREATE OR REPLACE PROCEDURE skeleton (a NUMBER)
IS
BEGIN
NULL;
END;
")
###
One way you could setup a sql execution to pass parameters it by using Node parameters, and then textually substituting.
For example, (again from the previous):
I open the node editor for the second DB Execute node, and I declare a node parameter called NUMBER. I give it the value 1.
I then modify the sql statement to the following:
###
sqlNonSelect("BEGIN skeleton ({{^NUMBER^}}); END;")
###
Note that I have enclosed the {{^^}} with Parenthesis as is required.
This method allows you to construct your sql statements, and then just alter their input via the parameters instead of having to modify the actual statements themselves. You could do this at the Node level, or at the Graph level. OR, you could do both, and have the option of setting some SQL parameters at the Graph level, and overriding the ones you want to at the Node level. ( An example of that would be to declare NUMBER at both graph and node parameters. The node will run the Graph level param unless you give it a value for itself).
Does this help?
Regards
Timon Koufopoulos
MDA Support.