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

Date conversion format Java to DB different format

I’m making a code in java that executes an Oracle database procedure The format I have to put there in the procedure when I run through the database is dd/MM/yyyy. I have to send this date from my java code using a CallebleStatement setDate with the date yyyy-MM-dd (which is the Date format in java) When this CallebleStatement is executed,

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:

Kotlin CLOB to String

I have a function in Oracle that returns a CLOB. In Java I can use the following code to execute this function and fetch the result: Oracle function definition in my Repository class: Conversion to String: What’s the equivalent code in Kotlin or any other way to convert the Clob to String? Answer It’s absolutely legal use @Query annotation in

Advertisement