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
How to handle plsql errors and exceptions
My code structure is as below.
PKG1
Procedure TEST1()
BEGIN
PKG2.TEST2;
PKG_X.TEST_X
EXCEPTION HANDLING
END;
PKG2
Procedure TEST2
BEGIN
If(Condition is met)THEN
//Should raise an error message
END IF;
END;
A…

RMD
- 311
- 1
- 7
- 22
0
votes
2 answers
How to update the below statement, i am getting error while update
I am trying to update the RRP_VALIDATION value as below, but getting error as sql command not ended properly, how to run the below statement with correct format.
UPDATE HES_REPORT_REF_PARAMS
SET RRP_VALIDATION = 'select to_char(RECONCILED_ID),…

Abinnaya
- 203
- 4
- 26
0
votes
1 answer
How to Unwrap Wrapped PL/SQL Packages?
For Oracle 12C+ versions, we are wrapping code now . How do we make sure that the correct version of PL/SQL Packages have been deployed. Before we had dba source to check , but after the wrapping of code , it is almost not possible. Is there any…
0
votes
1 answer
PLSQL Function with variable number of parameters
I have to write a generic plsql function which is supposed to submit any concurrent request.
For example, If the concurrent program has 5 parameters my function also should take 5 parameters as input. Like wise if the concurrent program has n number…

Sangam
- 1
- 1
0
votes
1 answer
unable to call main procedure from wrapper procedure asynchronously
I want to call main procedure from the wrapper procedure. Wrapper procedure I'm able to output with dbms output print line but I'm unable to print within the main proc, looks like the main proc is not called from wrapper procedure. Please help…

mu shaikh
- 83
- 6
0
votes
1 answer
how to return null if no data found from a function with return type sys_refcursor?
whenever i call this function it will return error like - invalid cursor
so, this is the body part of the package, the package specification also return a sys_refcursor. the error message shows that sys_refcursor invalid cursor.
FUNCTION SUMMARY
…

DIPAK SHAH
- 33
- 1
- 8
0
votes
0 answers
I keep getting this error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
I keep getting this error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 44
ORA-06512: at "SYS.DBMS_SQL", line 1721
Please what am I doing wrong here, because I have checked and it seems the code…

Efam
- 23
- 3
0
votes
2 answers
how to add audit table in package to capture timing in oracle
creating a package
inside package create 2 procedure and 2 function
now add audit to capture start timing and end timing for each procedure and function in
audit table
TBL_AUDIT_LOG(process_name,start_time,end_time,created_by,created_dttm)
0
votes
1 answer
SQL/PLSQL : Is this (given below) the correct way to call the function inside 'FROM clause' of a cursor query contained in package body:-
CURSOR recipe_attributes_cur(p_recipe_id IN recipe_data.recipe_id%TYPE) IS
SELECT t.attribute_name, t.attribute_value,
CASE
WHEN ra.enum_list IS NOT NULL
THEN (SELECT choice_str
FROM recipe_enums_v
…

Anshul Lavaniya
- 11
- 2
0
votes
1 answer
Perform validation from 2 tables in PL/SQL
I'm not sure what step should I perform here is it procedure, function, or what? So my goal is to check weather if those data exists in another table. For example in HR schema, I have to validate if the department_name =AD VP from DEPARTMENTS table…

thea
- 1
0
votes
1 answer
How to execute plsql procedure in shell script?
So I created a procedure in plsql but I want to automatically execute it in shellscript. Like if I insert a table using csv file then the procedure will automatically run using unix shellscript. The software that I'm using is cygwin.

thea
- 1
0
votes
2 answers
Unable to create table from within package
I am attempting to create a package in which I drop and create a table using a CTAS query. This table needs to be refreshed frequently and columns are add/removed all the time from the underlying data. Since the structure of the table is…

tlknoor
- 5
- 3
0
votes
1 answer
Expression having wrong type while using bulk collect
While using the bulk collect,I am geeting following errors.
"PLS-00597: expression 'EMP_REC' in the INTO list is of wrong type"
Can help me how to resolve it.
create table emp_det
(
emp_id number,
ename varchar2(3),
salary number,
dept_id…

Sunny
- 11
- 3
0
votes
1 answer
Hi, I'm new to PL/SQL and I want to know how to add a variable type in a package
I want to know how is ROT_TMLN_ARRAY type added to a variable in sql developer. I see that ROT_TMLN_ARRAY is also a type and I want to create something similar with another variable.
create or replace PACKAGE BODY AS PKG TMLN
PROCEDURE SP TMLN SVC…
0
votes
1 answer
Oracle PL/SQL public variable with db link in package body
I'm trying to use a global variable in package body with db link but SQLDeveloper throws me PL:00352
CREATE OR REPLACE PACKAGE BODY my_package
AS
global_variable ANOTHER_TABLE@MY_DB_LINK.ANOTHER_FIELD%TYPE;
PROCEDURE…