All Questions
102 questions
0
votes
3
answers
120
views
How to write dynamic SQL to select column names based on another table?
I have a use case where I want to write a dynamic sql which would select the column names dynamically based on the other table.
Query 1: select T_SERIES_VALUE from MONTHS_MAPPING where TIME_PERIOD = '...
0
votes
2
answers
64
views
Retrieving the highest varchar value
We are using the Oracle database.
I have a table with the below records
OrderNumber
-----------
JK-PO-01
JK-PO-02
JK-PO-03
Using PL/SQL, I would like to get the latest order number (JK-PO-03)
I tried ...
-1
votes
1
answer
74
views
How can I convert a small query from SQL Server to Oracle, I don't know how to apply their equivalents in reserved words?
I have always worked with SQL Server and now I want to learn Oracle, how can I convert this little query from SQL Server to Oracle?
I have errors in this query:
with cte as, OFFSET @start ROWS FETCH ,
...
0
votes
4
answers
2k
views
SELECT INTO STATEMENT INSIDE A SQL PROCEDURE THROWING AN ERROR
Hi I want to store a avalue of select statement into a variable and then update my table using that variable within the procedure but there is an error . I still dont know its only returning one ...
0
votes
1
answer
269
views
SYS_REFCURSOR as output parameter in a function
I have a function like below. How do I print the output for this function. I tried something below. But its throwing too many values error
CREATE OR REPLACE FUNCTION PMDB_POSTGRES.Fn_test
(
...
0
votes
1
answer
323
views
How to call a complex Oracle Procedure from PHP Code
Please help me to fix the below issue.
Intro:
I have made a custom MVC framework where I made a method which will call "Oracle Stored procedure". So now I am able to establish the connection ...
0
votes
1
answer
53
views
Oracle procedure pagination bringing back more rows than expected
This is a shortended down procedure for example purposes. The problem i am have is when i go to the next page on my application it brings back 5, then 10, then 15, then 10. I only want to bring back 5 ...
0
votes
2
answers
714
views
How to restrict any DML operation in a stored procedure
I am trying to insert some records into a table for a particular month. How do I restrict any DML operations on that table for rest of the other months in a stored procedure (without any trigger or ...
6
votes
1
answer
727
views
Oracle nested xml parsing
I have an excel and while import excel with application I convert to it XML string then send it to procedure in Oracle. Code below is my procedure.
PROCEDURE SP_UPLOAD_KALEMS(P_REFCURSOR OUT ...
-1
votes
2
answers
581
views
Passing date to Stored Procedure in Oracle SQL error : ORA-01858
I know this question has been answered previously, and I have tried out the solution given in them without success.
I have a stored procedure as below(I have removed non-essential parts) :
CREATE OR ...
0
votes
0
answers
40
views
SQL Developer - 11g Database - Debug Error
I have an issue with Oracle SQL Developer, when I try to debug an Procedure that i compiled for debugging, i get the folling error:
The code for my procedure is:
CREATE OR REPLACE PROCEDURE ...
2
votes
0
answers
117
views
Passing arguments inside procedure (message) not working - oracle
I want to create a procedure but i am having trouble while passing the arguments inside a function
This is my code:
select 'The concurrent '||program||' with request_id '||request_id||' ended with ...
1
vote
2
answers
843
views
SQL Stored Procedure data type for list of rows
What data type can I use to store all rows found by SELECT query?
CREATE OR REPLACE PROCEDURE handleFailedCalls(xNumber in varchar(10)) AS
result {DATA TYPE I WANT};
BEGIN
select * into result
...
4
votes
2
answers
5k
views
Stored procedure variable error in PLSQL when declaring variables
Using Oracle 11g when creating the following stored procedure
create or replace PROCEDURE sp_EqualVote(AREA IN NVARCHAR2, DATEOFVOTE IN DATE)
IS
DECLARE test nvarchar(255);
BEGIN
SELECT
...
0
votes
1
answer
2k
views
Oracle 11g - Scheduled Job Won't Run
I'm trying to create a job that runs a stored procedure in Oracle. I have tried creating the job with a script, and with the UI in SQL Developer, but haven't had any luck. It shows up in the Scheduler/...