All Questions
986 questions
0
votes
1
answer
64
views
SQL update column based on another table details
Source table:
customer
category
sales
date
order status
allen
in
200
04-03-2025
Completed
currie
out
300
04-03-2025
WIP
frank
out
400
04-03-2025
WIP
alice
in
500
04-03-2025
WIP
allen
out
400
04-03-...
0
votes
1
answer
57
views
PL/SQL JSON_OBJECT_T error Code: -40573 - ORA-40573: Invalid use of PL/SQL JSON object type
I'm trying to build one PL/SQL stored procedure to insert update delete data into the table using below procedure but it is failing with the error Error Code:
-40573 - ORA-40573: Invalid use of PL/...
3
votes
2
answers
108
views
Return multiple ref cursors in single OUT parameter of stored procedure
For the procedure below, I need to return the resultset of multiple dynamic queries into a single refcursor or any other type of output parameter.
Please note that in my project, I may have more than ...
0
votes
0
answers
52
views
Can't get the correct output when connecting C++ and SQL
Here are the instructions for the PL/SQL procedures, as well as the C++ function, but I can't seem to get it right.
customer_order (customerID IN number, orderID IN OUT number)
This procedure ...
0
votes
2
answers
84
views
Trying to execute a simple stored procedure - Help! Can't find an answer that works here
I'm completely new to SQL and am trying to execute a stored procedure that I'm not even sure I wrote correctly. It's supposed to give the total number of patients for a given dr, and this is the ...
0
votes
2
answers
67
views
How to insert records from table A to table B, avoiding inserting records from table A that already exist in table B
My table 'B' is the table where the data will be definitely stored without having repetitions while table 'A' is created to store any information including repetitions, this can happen because the ...
-1
votes
1
answer
369
views
How to enter cursor as an input in procedure oracle [duplicate]
I want to create a procedure that uses cursor as an input in Oracle. I tried something like this:
cursor cur is select * from table t1;
and then also:
create or replace procedure (I want to input ...
0
votes
1
answer
54
views
How to retrieve immediate previous row from start date and also start to end date data in Oracle SQL?
I want to retrieve data between a start date and an end date, including one immediate previous row from the start date for each row of data present in Oracle SQL. Ignore Unique id, as it is used for ...
0
votes
4
answers
498
views
How to add conditions to WHERE clause with if...else in SQL?
I have a stored procedure that I want to update to include another condition in the WHERE clause based on an optional parameter. Right now I am checking my_id but I want to add a check against ...
-1
votes
1
answer
39
views
Oracle SQL stored procedure output in actual column name and table data format#Multiple joins
create or replace procedure sp_mx_sal_emp
AS
fname varchar2(20);
lname varchar2(25);
sal Number(8,2);
country VARCHAR2(40);
region VARCHAR2(25);
BEGIN
select e.first_name, e.last_name, ...
0
votes
0
answers
107
views
Using SYS_REFCURSOR values in stored procedures in Oracle Database 19c
I am in the process of revising a collection of old ETL scripts. The scripts make frequent use of table CREATE/DROP for holding arrays for use in filters and joins. Currently the script runs 1.5 hours+...
0
votes
0
answers
28
views
Sorting is happening after pagination in oracle [duplicate]
I have this Procedure which retrieves data, Sorting it, Then paginate it base on pageNumber and pageSize, But when I execute this procedure and see the result I find that sorting is happening after ...
-1
votes
2
answers
79
views
Update not working properly in Oracle procedure
I have written an Oracle procedure if count is greater than 0 then update the table, but what is happening is it's updating all the records of the table with that one record.
Here is the query
SELECT ...
0
votes
2
answers
66
views
Oracle SQL string always missing expression inside stored procedure
I am currently resolving issues regarding stored procedure which has a string type of query. This is because of dynamic params like order by and keeps getting missing expression. I wonder where could ...
-2
votes
1
answer
518
views
Oracle Create Stored Procedure to return list
I have a task table in which there are 3 columns(id,TimeStamp,Is_procssed).And i have created a stored procedure in oracle as given below.
CREATE OR REPLACE PROCEDURE AUDITING....