Skip to content

Tag: oracle

Store date in AEST timezone in database

We have two tables in oracle db as below, TableA => Column DateA (type DATE) TableB => Column DateB (type DATE) DateA column in TableA has dates stored in UTC. DateB column in TableB has dates stored in AEST. When I checked the code (its in java) where the dates are being stored in these tables, both ar…

Pass String array to Oracle query using jOOQ

I’m using the jOOQ code generator to call an query from an Oracle package. One of the parameters of the query is a String array. The first issue, is that the code generator used Object as the type of the parameter. The generated documentation tells me to use an explicit Binding, but doesn’t say ho…

Empty CLOB instead of NULL in Oracle CLOB field

Writing null string into Oracle CLOB field using Hibernate sometimes result in an empty CLOB instead of NULL in the field. Table STEP with a mix of varchar2, number and CLOB fields once was extended with a new CLOB field. and a corresponding field was added to entity All work as expected when non-null value s…

How to select by DATE type in jdbc using oracle DB?

In my Database created_date colum of data type is DATE and I want to select by DATE type in jdbc using ORACLE database, but when I run this method like this , I have getting this error. How to solve this problem? I have tried many things, but coludn’t solved. Answer The main problem here is that you are…

executeUpdate() returns always 1 with MERGE statement

ExecuteUpdate() is always returning 1. Pls suggest and appreciate any input. Procedure: Java code: stmt.executeUpdate() – always returns 1, even though insertion happens only once. Appreciate any inputs on this. Ideally, if there are no insertions or errors, it should return 0 or any exception trace. Pl…

JOOQ With Oracle: ORA-00911: invalid character

I am using JOOQ With Oracle 19. In running a Simple query, it is giving invalid character below. Not sure why its creating quotes ‘ either. Java and stack trace SQL below. How can this be fixed for a simple query? It compiles fine however it running produces error. Java: Console Log I copied the SQL que…