Hi,
I am using node-red-contrib-oracledb-mod
and it works very well.
In one of my use-cases, I insert to a table which auto-generates a transaction Id, and returns it into a variable which is then used in an additional insert to another table.
I do both inserts as one transaction, with commit/rollback in the end, hence I send a PL/SQL block:
msg.query =
"DECLARE new_id NUMBER;
BEGIN
INSERT INTO <table 1> (TRX_ID,...) VALUES(BR_SEQ.nextval,...)
returning TRX_ID into new_id;
INSERT INTO <table 2> (TRX_ID,...) VALUES (new_id,...);
<commit/rollback etc.>;
END;"
When running it, I get no output (response payload is undefined).
Any idea how I can get back the new_id
variable to the flow?
I could re-query my insert, but afraid of race condition with other concurrent dashboard clients.