Skip to content
Advertisement

Tag: oracle

Create a table “ca” as a statement using values of another tables but while inserting new values, the values of “ca” doesn’t change

I want to calculate turnover like in new table called ca ‘ I have tables article (idarticle, priceBuying, priceSale, quantity), and table command have (idarticle, quantity, dateSale), I want to calculate turnover automatically everyday and insert into ca , but the problem is when I insert new values into command the values of ca not updating using oracle db. Answer

Compiling a function or procedure using JDBC removes all records from all_statements view

After I execute/compile a stored procedure/function, I query the all_statements view to extract the statements that were in the stored procedure/function like below: However, one of my applications run the following code: Whenever this code is run, the all_statements view is cleared. Even if I execute this same function like below: There are no new entries in all_statements showing the

Why can’t a bind variable be used from ojdbc with Oracle JSON_ARRAY() in the presence of FORMAT JSON

In Oracle, the following query: Produces the following JSON document: When I try to run this query with bind variables from JDBC like this: Then I’m getting: I’m using these versions: Database: Oracle Database 21c Express Edition Release 21.0.0.0.0 – Production ojdbc: com.oracle.database.jdbc:ojdbc11:21.5.0.0 Is this a bug? Can it be worked around? Answer In my opinion, it’s a bug in

ORA-29531: no method in class (java)

I have a java procedure inside a package in Oracle: and it is defined something like this: When I try to call the procedure like this: it throws an error: Does anybody know the problem? Answer The int primitive and the Integer class are not the same thing, so your declaration does not match the Java method. It should be:

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)

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

Advertisement