ICC
ICC

Reputation: 33

Update a lob value with EMPTY_BLOB() in Oracle using Kotlin Exposed framework

I am writing something in kotlin for a project that uses Exposed. I need to empty the lob values within a table by running an update like this :

UPDATE VALUES SET BLOB_VALUE = EMPTY_BLOB() WHERE VALUE IN SELECT VALUE FROM TEMP_TABLE;

I am writing an update like :

   Values.update( { InQuery(tempTableFilter) }) {
      it[value] = value.function("EMPTY_BLOB()")
   }

This however adds the column name within function brackets which is not what I need.

UPDATE VALUES SET BLOB_VALUE = **EMPTY_BLOB(VALUE)** WHERE VALUE IN SELECT VALUE FROM TEMP_TABLE;

Anyone knows how can I achieve the first update using Kotlin exposed?

Thanks !

Upvotes: 2

Views: 53

Answers (0)

Related Questions