A PL/SQL package is a schema object that groups logically related PL/SQL types, items, and subprograms. Use this tag for questions referring to the PL/SQL packages usage and behaviour.
Questions tagged [plsql-package]
240 questions
0
votes
1 answer
Db2: How to deploy an Oracle PL/SQL package in db2?
I tried to create an Oracle PL/SQL package in Db2, but ran into errors.
CREATE OR REPLACE PACKAGE ARITHMETIC AS
function add (
first number,
second number)
return number;
END ARITHMETIC;
CREATE OR…

raj
- 51
- 2
- 5
0
votes
3 answers
How to create a PL/SQL package to discard multiple level of cascading views
I am working on a CR where I need to create a PL/SQL package and I am bit confused about the approach.
Background : There is a View named ‘D’ which is at end of the chain of interdependent views in sequence.
We can put it as :
A – Fact table…
-1
votes
1 answer
ORA-29282: invalid file ID in a procedure call
I have a plsql procedure that runs successfully . When i call this procedure into another procedure in a different package, it error's out with invalid file id .
Proc test1(debug varchar2 default 0) as
dt date;
cursor 1
select sysdate…

arsha
- 67
- 6
-1
votes
1 answer
Using Execute immediate along with variable
I have a statement which inserts into table with difference count between original table and backup data
EXECUTE IMMEDIATE 'INSERT INTO LOG_table (TABLE_NAME,TYPE,COUNT,QUARTER)
SELECT NAME,TYPE,COUNT,QUARTER FROM (SELECT COUNT(*)…

Leverage
- 63
- 7
-1
votes
1 answer
How long expired (grace) status will exist?
How long expired(grace) status will exist before the actual expiration of user in Oracle?
How to find the actual expiry date when a user is in expired(grace) status?
I have tried using dba_users table but in the table expiry date is null for users…

Ananthu rajeev
- 21
- 3
-1
votes
1 answer
Stored procedure for money transfer in PLSQL
Hope this task find you well.
Please help me out with this,
My requirement is to transfer money from one account to another account which is in a same table.
the procedure should have 3 in parameters,
They are,
--> from_account_number
-->…
-1
votes
2 answers
How to access Package Public variable into SELECT Statement using EXECUTE IMMEDIATE?
CREATE OR REPLACE PACKAGE sample_pkg AS
g_var VARCHAR2(5);
END sample_pkg;
/
CREATE OR REPLACE PACKAGE BODY sample_pkg AS
BEGIN
g_var := 'hello';
dbms_output.put_line(g_var);
END;
/
SELECT sample_pkg.g_var FROM dual;
error
ORA-06553: PLS-221:…

Dhara Khunt
- 3
- 2
-1
votes
2 answers
sir give me Q. "Write a procedure named expensive_books which finds the details of books with a price is more than the average price in pl/sql"
I tried a lot but i can't get answer
I write this program and I also write "set serveroutput on;" but this is not showing output
this is table
and this is code
declare
name book.book_title%type;
price book.book_price%type;
p…

YASH BHAVSAR
- 1
- 2
-1
votes
1 answer
we have g_errbuf := SQLERRM in the exception blocks . What is assigned to variable g_errbuf here?
EXCEPTION
WHEN OTHERS THEN
g_errbuf := SQLERRM;
g_retcode := 2;
write_log('Y',
to_char(SYSDATE, 'HH24:MI:SS') || ' - ' ||
'Data Error happened having Batch ID = ' || p_batch_id ||
…

LittleBitDeveloper
- 17
- 4
-1
votes
2 answers
The package ends with a failed status. ORA-00937 not so easy
PS The answers provided did not help. The error still persists. Need help if someone can still help :)
Good day. The package compiles successfully, and when I call it through a job, I get the failed status and an error
"ORA-00937: not a…

Valtesar
- 41
- 4
-1
votes
2 answers
How to use Substitution in Stored Procedure
Actually I am creating stored procedure with substitution, while trying to compile the procedure, I get the popup to enter the substitution values in compiling itself, Instead of getting popup while execution.
Please share me your idea to compile…

Caroline
- 1
-1
votes
2 answers
How to call a function from a PL/SQL file inside a package function of another PL/SQL file using PL/SQL (Oracle 10g)
I have two sql file.one is "function.sql" and another is "donor.sql". "donor.sql" has a package "AddDonor" and "add_donor" function.This is the code :
create or replace package AddDonor as
function add_donor(id in Donation.id%TYPE,d_id in…

Lb4340
- 39
- 5
-1
votes
1 answer
Reg: procedure is giving erro
Below is my procedure giving error below, kindly check and confirm.
create or replace PROCEDURE CLEANUP_rec
IS
BEGIN
EXECUTE IMMEDIATE 'create table TEMP_JOB_ID_FROM_JOB_DOC_1119 as select JOB_ID, last_update_time_utc, status from J_DOC where…

singh_dba
- 31
- 4
-1
votes
2 answers
Encountered the symbol "EXCEPTION" when expecting one of the following: ,
1.This is a package to take input from user several details and store it in DB, but here I'm getting several errors while creating validation(exception part)
create or replace PACKAGE MOVIE_PKG
AS
PROCEDURE ADDCONSUMERDETAILS(c_con_ID…

Gaurav Rastogi
- 1
- 4
-1
votes
1 answer
issue on creating package
Warning: Package Body created with compilation errors. BEGIN
ERROR at line 1: ORA-04063: package body "P13279.EMP_DESIGNATION" has errors ORA-06508: PL/SQL: could not find program unit being
called: "P13279.EMP_DESIGNATION" ORA-06512: at line 2

HARINAVEENKUMAR T
- 11
- 5