I have this query:
DECLARE
p_term_code_sturec VARCHAR2(6);
BEGIN
SELECT SHRDGMR_TERM_CODE_STUREC
INTO p_term_code_sturec
FROM SHRDGMR
WHERE SHRDGMR_PIDM = 123456
AND SHRDGMR_SEQ_NO = 2;
baninst1.sb_learneroutcome.p_update(
123456,
2,
'GR',
TO_DATE('10000101', 'YYYYMMDD'),
TO_DATE('09/30/2024', 'MM/DD/YYYY'),
'',
p_term_code_sturec,
'',
'',
'WG',
'',
TO_DATE('10000101', 'YYYYMMDD'),
'',
'',
'',
'',
'',
'',
'',
USER,
'GradAutomation',
NULL,
NULL
);
END;
If I run it at the command line it works as expected. No issues.
However, when I add it to my flow (here is my current flow):
I get the error "Oracle query error:
ORA-01036: unrecognized bind variable 6 passed to the bind call
Help: https://docs.oracle.com/error-help/db/ora-01036/
Notice that it complains about variable 6.
My Graduation Updates function has the following declarations:
msg.payload = {
StudentPIDM : msg.payload['Student PIDM'],
DegreeSequence: msg.payload['Degree Sequence'],
OutcomeStatus: msg.payload['Outcome Status'],
GraduationStatus: msg.payload['Graduation Status'],
GraduationDate: msg.payload['Graduation Date']
}
return msg;
And my my SHRGMR Update node has the following SQL:
DECLARE
p_term_code_sturec VARCHAR2(6);
BEGIN
SELECT SHRDGMR_TERM_CODE_STUREC
INTO p_term_code_sturec
FROM SHRDGMR
WHERE SHRDGMR_PIDM = :StudentPIDM
AND SHRDGMR_SEQ_NO = :DegreeSequence;
baninst1.sb_learneroutcome.p_update(
:StudentPIDM,
:DegreeSequence,
:OutcomeStatus,
TO_DATE('10000101', 'YYYYMMDD'),
TO_DATE(:GraduationDate,'MM/DD/YYYY'),
'',
p_term_code_sturec,
'',
'',
:GraduationStatus,
'',
TO_DATE('10000101', 'YYYYMMDD'),
'',
'',
'',
'',
'',
'',
'',
USER,
'GradAutomation',
NULL,
NULL
);
END;
Is there something I'm doing wrong? I've been going at it for awhile but I cannot see a reason to get an error.
I'm assuming I'm OK using semicolons at the end of the SQL statements.
Is there something you guys can see that is a red flag?
Thanks.