Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ERROR MESSAGE PLS-00382 - expression is of wrong type

774561Jun 1 2010 — edited Jun 1 2010
I have read similar posting on the web. I have tried it all but I am still getting the error message. Kindly note planner_id was defined as a varchar2 when the table was created.
---------------------------------------------------------------------------------------------------------------------------------------------------------------

SEE SPECIFICATION BELOW

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type labour_rec is RECORD
(
labour_cell VARCHAR2(300));

Type cur_labour is REF CURSOR RETURN labour_rec;

FUNCTION labour_record (l_planner_id in rcl.copq_raw_labour.planner_id%type) return cur_labour;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

SEE BODY BELOW
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FUNCTION labour_record (l_planner_id in rcl.copq_raw_labour.planner_id%type) return cur_labour IS
my_cur_labour cur_labour;
BEGIN
OPEN my_cur_labour FOR

select c1.transaction_date, c1.workorder, c1.seq_no, c1.resource_id, c1.warehouse_id, c1.planner_id, c1.employee_id, c1.hours_worked

from copq_raw_labour c1
where c1.planner_id = l_planner_id;
close my_cur_labour;
--return my_cur_labour;
end labour_record;
This post has been answered by Tubby on Jun 1 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2010
Added on Jun 1 2010
5 comments
1,589 views