# Query not being commited

**URL:** <https://discourse.nodered.org/t/query-not-being-commited/90869>\
**Category:** General\
**Created:** [10 September 2024 19:39 UTC](https://discourse.nodered.org/t/query-not-being-commited/90869 "2024-09-10T19:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralvez](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ralvez](https://discourse.nodered.org/u/ralvez)\
**Post date:** [10 September 2024 19:39 UTC](https://discourse.nodered.org/t/query-not-being-commited/90869/1 "2024-09-10T19:39:04Z")

</div>

I have a query that looks like this:

```auto
INSERT INTO SHRDGIH ( 
    SHRDGIH_PIDM,
    SHRDGIH_DGMR_SEQ_NO,
    SHRDGIH_HONR_CODE,
    SHRDGIH_ACTIVITY_DATE,
    SHRDGIH_TRANSC_PRT_IND,
    SHRDGIH_COMMENCE_PRT_IND,
    SHRDGIH_USER_ID,
    SHRDGIH_DATA_ORIGIN)
VALUES(
    :StudentPIDM,
    :DegreeSequence,
    :InstitutionalHonors,
    SYSDATE,
    :TranscriptIndicator,
    :CommencementReport,
    USER,
    'GradAutomation'
)

```

The query works fine BUT ... it seems like it keeps the data in memory and does not commit it.  
If I manually commit it it's fine.  
I figured that I could re-wirte it like this:

```auto
INSERT INTO SHRDGIH ( 
    SHRDGIH_PIDM,
    SHRDGIH_DGMR_SEQ_NO,
    SHRDGIH_HONR_CODE,
    SHRDGIH_ACTIVITY_DATE,
    SHRDGIH_TRANSC_PRT_IND,
    SHRDGIH_COMMENCE_PRT_IND,
    SHRDGIH_USER_ID,
    SHRDGIH_DATA_ORIGIN)
VALUES(
    :StudentPIDM,
    :DegreeSequence,
    :InstitutionalHonors,
    SYSDATE,
    :TranscriptIndicator,
    :CommencementReport,
    USER,
    'GradAutomation'
);
commit;

```

But when I do I get an error for "query improperly terminated".  
BTW, this is an Oracle DB in case it matters.

Any ideas to get around this issue?  
Thanks!

NOTE: I'm using a function to set the values.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/7/270e70013ba419248ed765348335485e0b22beb2.png)

Also node-red-contrib-oracledb-2

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 December 2024 19:39 UTC](https://discourse.nodered.org/t/query-not-being-commited/90869/2 "2024-12-09T19:39:42Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
