I am currently struggling with Oracle Apex, trying to show a Button, when the Value of a Page Item is greater than Zero (numeric). Figured the Server Side Condition (SQL Expression) would be the best Idea and my SQL Code is: I am however getting the error: ORA-06550: line 1, column 37: ORA-00920: invalid rela…
Tag: oracle
SQL – Join with keys separated by pipe
TABLE_A TABLE_B How can I join table A and B to get all those who helped in the cargo? Will I need to write a function? I did not develop the program. I’m creating a dashboard and need that info. Using ORACLE 11g DB CONCLUSION — SOLVED After a bit of research and help of friends I was able to
Correlated Subquery working differently for Oracle 12c and 11g
We have a generic table that holds multiple records (DDL and DML below): Below are the records: The query below works in 12c, but Errors out in 11g: It errors out with ORA-00904: “AR_TRX”.”TRX_ID”: invalid identifier. I believe this is caused by the correlated subquery AR_TRX linked to…
Oracle SQL Recursive Query When FieldType is Subpage
I have a table PanelDefn which has list following fields I would like to write a query which recursively gives the data for SubPanel when I query for Panel. It means whenever we encounter FieldType=11 , we need to have recursive query for that. I tried using connect-by. Answer I guess you need below query …
Fetch multiple rows with PL/SQL procedure
Procedure: This procedure works for me. I am executing the procedure with below code: Execution: I have to call the procedure in java with JDBC. So how can I call the procedure in java by above execution code? Answer Use a collection (which you can create using CREATE TYPE … AS TABLE OF …) or VARR…
insert XML request into clob column using Oracle
I do have XML request as below: I wanted to insert it into a table in clob column but due to double quotes (” “) it is not insertable and below error is observed . SQL Error: ORA-01756: quoted string not properly terminated it is not insertable. Please suggest Answer Oracle uses single quotes to d…
Oracle SQL3 3 nesting tables insert problem
I’m making an SQL3 script where I create types and then create tables and nested tables. The prolem I’m getting happens when I want to insert a row where it says : ORA-00932: inconsistent datatypes: expected UDT got CHAR this is an online reproduction of the problem where the types and tables are …
Oracle SQL Unique Constraint Violated
I need to create tables and input values. All but two rows when inserted give me an error, Unique Constraint Violated. The last row in DEPT_LOCATIONS table and the second to the last row in DEPENDENT table. I’m not sure why these rows aren’t being added because other rows in the same table are. He…
SQL – get MIN value of row and check this MIN value to be in row at least 2 times
What I’m trying to achieve is this: 1) Get the minimum value of a salary in the table for every department. 2) If this minimum value exists in the table at least two times for every department, then …
Using CURSOR expression in WITH Clause in query Oracle 12.1
I have a strange issue where the data showing up in Cursor is incorrect. Below is the table and the query. But when I replace the CURSOR (Select * from H) with CURSOR( actual query of H ) , it works Output of above query give Cnt = 3 and cursor has data as below which is incorrect. But when