Skip to content
Advertisement

Tag: oracle

How can i connect to the oracle database between docker containers?

I have two containers that is created from docker-compose, one has api with springboot and the other oracle database, however it does’n connect the api to the database and I already ran out options, I tried configure the connection in the aplication.properties and also docker-compose.yml This is docker-compose.yml Dockerfile aplication.properties (The connection was commented because in the docker-compose it’s configured)

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 are just instantiating

Escape semi colon in “CREATE OR REPLACE AND COMPILE JAVA” statement

I’m trying to execute the following statement in Navicat, But since ; is treated as a delimiter in SQL query, the query became “incomplete” and results in an error: So how can I execute this statement in Navicat? Answer Store the command as a string and dynamically execute it with an anonymous PL/SQL block: Not many Oracle IDEs understand the

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 how or where. I assume I

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 stored. But when new record

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 binding

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. Pls, suggest.** Answer We can make the column a primary key. Now when multiple

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 query into Oracle SQL

Advertisement