PLS-00382 Error in procedure
I have a procedure (below) that is invalid. Last night the instance of the database I'm working in got refreshed (data only) and a few of my procedures were invalidated, including this one. When I tried to recreate it I got the following error:
PLS-00382: expression is of wrong type
I don't understand why it's now not working (worked fine yesterday), or what this error means in relation to the statement.
Does anyone know what I'm doing wrong here?
Thanks,
Pete
SQL> CREATE OR REPLACE PROCEDURE nyp.WBS_NOTE
2 IS
3 CURSOR C_WBS_NOTES IS
4 SELECT * FROM WBS_NOTES;
5 V_WBS_ID NUMBER;
6 V_WBSMEMO_ID NUMBER;
7 V_PROJ_ID NUMBER;
8 V_WBS_VAL VARCHAR2(200);
9 V_WBS_PARENT VARCHAR2(200);
10
11 BEGIN
12 UPDATE
13 WBS_NOTES W
14 SET W.TEXT = REPLACE(W.Text, 'CHR(13)', '
15 ');
16 INSERT INTO WBS_NOTE_PROJ_NOT_FOUND
17 SELECT *
18 FROM WBS_NOTES W WHERE EXISTS(
19 SELECT 'A'
20 FROM ACC_CONV_PROJ_NOT_FOUND P
21 WHERE W.Project_num = P.Project_num);
22 DELETE
23 FROM WBS_NOTES W WHERE EXISTS(
24 SELECT 'A'
25 FROM ACC_CONV_PROJ_NOT_FOUND P
26 WHERE W.Project_num = P.Project_num);
27 FOR NOTES IN C_WBS_NOTES LOOP
28 SELECT P.PROJ_ID
29 INTO V_PROJ_ID
30 FROM PROJECT P
31 WHERE P.PROJ_SHORT_NAME = NOTES.PROJECT_NUM;
32 V_WBS_VAL := NOTES.WBS;
33 V_WBS_PARENT := SUBSTR(V_WBS_VAL, 1, INSTR(V_WBS_VAL, '.', -1) - 1);
34 WHILE INSTR(V_WBS_PARENT, '.') <> 0 LOOP
35 V_WBS_PARENT := SUBSTR(V_WBS_PARENT, INSTR(V_WBS_PARENT, '.') + 1, 200);
36 END LOOP;
37 V_WBS_VAL := SUBSTR(V_WBS_VAL, INSTR(V_WBS_VAL, '.') + 1, 200);
38 WHILE INSTR(V_WBS_VAL, '.') <> 0 LOOP
39 V_WBS_VAL := SUBSTR(V_WBS_VAL, INSTR(V_WBS_VAL, '.') + 1, 200);
40 END LOOP;
41 SELECT W.WBS_ID
42 INTO V_WBS_ID
43 FROM PROJWBS W
44 , PROJWBS PW
45 WHERE UPPER(W.WBS_NAME) = UPPER(V_WBS_VAL)
46 AND PW.PROJ_ID = V_PROJ_ID
47 AND PW.WBS_ID = W.PARENT_WBS_ID
48 AND UPPER(PW.WBS_SHORT_NAME) = UPPER(V_WBS_PARENT);
49 GETNEXTKEYS('wbsmemo_wbs_memo_id', 1, V_WBSMEMO_ID);
50 EXECUTE IMMEDIATE
51 ' INSERT INTO WBSMEMO ' ||
52 ' SELECT ' || V_WBSMEMO_ID ||
53 ', ''' || V_PROJ_ID || '''' ||
54 ', ''' || V_WBS_ID || '''' ||
55 ', MT.MEMO_TYPE_ID ' ||
56 ', ''' || NOTES.TEXT || '''' ||
57 ' FROM MEMOTYPE MT ' ||
58 ' WHERE MT.MEMO_TYPE = ''' || NOTES.NTBKTYPE || '''';
59 END LOOP;
60 END;
61 /
Warning: Procedure created with compilation errors.
SQL> SHOW ERRORS
Errors for PROCEDURE NYP.WBS_NOTE:
LINE/COL ERROR
50/2 PL/SQL: Statement ignored
51/2 PLS-00382: expression is of wrong type
There could be data type mis-match within the time you re-compiled the program. Check the data type for which you are Inserting / Updating with the values you are actually using to populate.
Note:
Insert into TABLE1
Select * from TABLE2.
It is not advisible to have the above statement
eventhough this will work as long as
the fields in table TABLE1 and TABLE2 are same.
Instead of "*" use the filed names.
CRAMANA
Similar Messages
-
create or replace TRIGGER MS_TRIGG_PRICE_CHANGE before INSERT
ON MS_OBIEE_PRICE_CHANGE
FOR EACH ROW
declare
L_xpricechghrdtl_tbl "RIB_XPriceChgHrDtl_TBL" := NULL;
L_xpricechghrdtl_rec_1 "RIB_XPriceChgHrDtl_REC" := NULL;
L_xpricechgdesc_rec_1 "RIB_XPriceChgDesc_REC" := NULL;
L_xpricechgexcst_tbl "RIB_XPriceChgExcSt_TBL" := NULL;
L_xpricechgexcst_rec_1 "RIB_XPriceChgExcSt_REC" := NULL;
O_STATUS_CODE VARCHAR2(255) := null;
O_ERROR_MESSAGE RTK_ERRORS.RTK_TEXT%TYPE := null;
L_message_type VARCHAR2(20) := 'XPRICECHGMOD';
O_rib_error_tbl RIB_ERROR_TBL := NULL;
program_error exception;
BEGIN
L_xpricechghrdtl_rec_1 := "RIB_XPriceChgHrDtl_REC"(50,:new.loc);
L_xpricechghrdtl_tbl := "RIB_XPriceChgHrDtl_TBL"();
L_xpricechghrdtl_tbl.extend();
L_xpricechghrdtl_tbl(1) := L_xpricechgdesc_rec_1;
It shows the error
SQL> show err
Errors for TRIGGER MS_TRIGG_PRICE_CHANGE:
LINE/COL ERROR
21/4 PL/SQL: Statement ignored
21/31 PLS-00382: expression is of wrong type
Please let me know the possible reasons behind the error.I created a trigger for a table that creates a recordtype for posting to a function that expects a recordtype as an input parameter.
THe full trigger code is as follows:
create or replace TRIGGER MS_TRIGG_PRICE_CHANGE before INSERT
ON MS_OBIEE_PRICE_CHANGE
FOR EACH ROW
declare
L_xpricechghrdtl_tbl "RIB_XPriceChgHrDtl_TBL" := NULL;
L_xpricechghrdtl_rec_1 "RIB_XPriceChgHrDtl_REC" := NULL;
L_xpricechgdesc_rec_1 "RIB_XPriceChgDesc_REC" := NULL;
L_xpricechgexcst_tbl "RIB_XPriceChgExcSt_TBL" := NULL;
L_xpricechgexcst_rec_1 "RIB_XPriceChgExcSt_REC" := NULL;
O_STATUS_CODE VARCHAR2(255) := null;
O_ERROR_MESSAGE RTK_ERRORS.RTK_TEXT%TYPE := null;
L_message_type VARCHAR2(20) := 'XPRICECHGMOD';
BEGIN
L_xpricechghrdtl_rec_1 := "RIB_XPriceChgHrDtl_REC"(50,:new.loc);
L_xpricechghrdtl_tbl := "RIB_XPriceChgHrDtl_TBL"();
L_xpricechghrdtl_tbl.extend();
L_xpricechghrdtl_tbl(1) := L_xpricechgdesc_rec_1;
L_xpricechgdesc_rec_1 := "RIB_XPriceChgDesc_REC"('MS_TRIGG_PRICE_CHANGE', -- namespace
:new.item, -- Item number
'', -- diff_id
:new.selling_unit_retail, --Selling Unit Retail
'EA', -- selling UOM
'', -- multi units
'', -- multi unit retail
'', -- multi selling uom
:new.currency_code, -- currency_code
'', -- country
'S', -- hier_level
L_xpricechghrdtl_tbl,
L_xpricechgexcst_tbl);
RMSSUB_XPRICECHG.CONSUME (O_status_code,
O_error_message,
L_xpricechgdesc_rec_1,
L_message_type);
if O_status_code <> 'S' and O_status_code is NOT NULL then
:new.status := 'Failed';
:new.error := O_error_message;
end if;
end;
The function called is RMSSUB_XPRICECHG.CONSUME. -
PLS-00382 Type error in the select statement in the Cursor.
Hi,
I am trying to combine several different sql statements to form one large cursor for my java layer. I have attached the PL/SQL procedure that I am using and when I am trying to compile it is giving PLS-00382 error. Please help me.
PL/SQL Code.
CREATE OR REPLACE PROCEDURE test IS
tmpVar NUMBER;
TYPE checkRecord is RECORD (
name1 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name2 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name3 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name4 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
oppstatus1 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount1 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount1 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus2 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount2 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount2 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus3 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount3 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount3 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus4 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount4 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount4 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE);
TYPE checkCur IS REF CURSOR RETURN checkRecord;
checkCurVal checkCur;
checkCurRec checkRecord;
chechcurVal checkCur;
NAME: test
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 3/8/2006 1. Created this procedure.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: test
Sysdate: 3/8/2006
Date and Time: 3/8/2006, 10:01:59 AM, and 3/8/2006 10:01:59 AM
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
BEGIN
tmpVar := 0;
OPEN checkCurVal FOR
SELECT
a.distmgrfname,
a.distmgrlname,
a.salesrepfname,
a.salesreplname,
cursor (
SELECT b.oppstatus,
b.oppcount,
b.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL b
where b.userid = '100000001' AND
b.reportid = 'ISARPTR25' AND
b.oppstatus = 'Open' AND
b.isoppstatusselected = 'Y'),
cursor (
SELECT c.oppstatus,
c.oppcount,
c.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL c
where c.userid = '100000001' AND
c.reportid = 'ISARPTR25' AND
c.oppstatus = 'Commit' AND
c.isoppstatusselected = 'Y'),
cursor (
SELECT
d.oppstatus,
d.oppcount,
d.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL d
where d.userid = '100000001' AND
d.reportid = 'ISARPTR25' AND
d.oppstatus = 'Closed-Won' AND
d.isoppstatusselected = 'Y'),
cursor (
SELECT
e.oppstatus,
e.oppcount,
e.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL e
where e.userid = '100000001' AND
e.reportid = 'ISARPTR25' AND
e.oppstatus = 'Closed-Lost' AND
e.isoppstatusselected = 'Y')
from APPS.EMCSV_R25_DIST_PROF_TBL a
where a.userid = '100000001' AND
a.reportid = 'ISARPTR25' AND
a.isoppstatusselected = 'Y' ;
LOOP
FETCH checkCurVal INTO checkCurRec;
EXIT WHEN checkCurVal%NOTFOUND;
DBMS_OUTPUT.PUT_LINE (checkCurRec.name1 ||
checkCurRec.name2 ||
checkCurRec.name3 ||
checkCurRec.name4 ||
checkCurRec.oppstatus1 ||
checkCurRec.oppcount1 ||
checkCurRec.oppamount1 ||
checkCurRec.oppstatus2 ||
checkCurRec.oppcount2 ||
checkCurRec.oppamount2 ||
checkCurRec.oppstatus3 ||
checkCurRec.oppcount3 ||
checkCurRec.oppamount3 ||
checkCurRec.oppstatus4 ||
checkCurRec.oppcount4 ||
checkCurRec.oppamount4);
END LOOP;
END test;
/Thanks for Replying.
I am trying to build a cursor to fetch the records from the table. Table structure is something like this.
reportid VARCHAR2(10) NOT NULL,
distmgrid NUMBER DEFAULT 0,
salesrepid NUMBER DEFAULT 0,
distmgrfname VARCHAR2(40 CHAR) DEFAULT 'rfname',
distmgrlname VARCHAR2(40 CHAR) DEFAULT 'rlname',
salesrepfname VARCHAR2(40 CHAR) DEFAULT 'afname',
salesreplname VARCHAR2(40 CHAR) DEFAULT 'aname',
issalesrepselected CHAR(1 CHAR) DEFAULT 'Y',
oppstatus VARCHAR2(40 CHAR) DEFAULT 'oppstatus',
isoppstatusselected CHAR(1 CHAR) DEFAULT 'Y',
oppcount NUMBER DEFAULT 0,
oppamount NUMBER DEFAULT 0,
oppquote NUMBER DEFAULT 0,
Attribute1 VARCHAR2(10 CHAR),
Attribute2 VARCHAR2(15 CHAR),
Attribute3 NUMBER,
Attribute4 NUMBER
But from the above table, I am trying to build a report for which I need a cursor which I listed in the proc. Is it not possible to build a cursor within a cursor?
Yes each individual cursor return only one row. -
PLS-00382: expression is of wrong type
Hi,
oracle 9.2
I have to write one simple procedure to retrieve some column records from the table.
In the Begin... end block...I have written select statement
Now, if i include all the columns in the select query then procedure gets compile without any error...but when I remove any one column or select specific columns in the select query of that procedure then I get below error..
PLS-00382: expression is of wrong type
can anybody explain ?
RegardsHi,
below has been defined in the declaration part and using the below defined cur3 for the OUT parameter.
TYPE Rec3 IS RECORD
col1 tab.col1%TYPE,
col2 tab.col2%TYPE,
col3 tab.col3%TYPE,
col4 tab.col4%TYPE,
TYPE Cur3 IS REF CURSOR RETURN Rec3 ;
is it due to record type has been defined ?
Regards -
Hi There,
being really new to Oracle I was looking through the samples that are installed when you install Oracle. Under PACKAGES/SCOTT there is a single package that is valid, under PROCEDURES/SCOTT is a single procedure that is invalid, when compiling it gives the above errors.
Could anyone shed some light into my darkness please.
Thanks
SteveThe procdure source and error stack is.....
SQL> create or replace procedure EmployeeInfoProc
2 (empcursor IN OUT
3 EmployeeInfo.EmployeeCursor)
4 As
5 Begin
6 Open empcursor For
7 select * from emp;
8 End;
9 /
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE EMPLOYEEINFOPROC:
LINE/COL ERROR
6/1 PL/SQL: SQL Statement ignored
7/1 PLS-00382: expression is of wrong type
SQL>
The version is 8.1.6 and the package and procedure are those that come with the software
Thanks
Steve -
I'm trying to write a procedure that will compute the start and end dates of the weeks within a period, etc. Number of business days in a week is 5; that is, Monday to Friday.
The first part of the code I have to write is giving me problems please help. The table below was created:
Wrote file afiedt.buf
1 CREATE TABLE WEEKS
2 (WEEKID VARCHAR2(20),
3 TRANSACTION_YEAR VARCHAR2(20),
4 START_DATE DATE,
5 END_DATE DATE,
6 DAYS VARCHAR2(20),
7* WEEK_NUMBER VARCHAR2(20))
SQL> /
Table created.
SQL> --- Code To Generate start date, end date weekid, week number, etc in A financial Year
SQL> Create OR REPLACE PROCEDURE Weeksinyear IS
2 BEGIN
3 declare
4 sdate_v weeks.start_date%type;
5 edate_v weeks.end_date%type;
6 ndays_v weeks.days%type;
7 nweek_v Weeks.week_number%type;
8 weekid_v weeks.weeksid%type;
9 transyear_v weeks.weeks.transaction_year%type;
10 numbweeks_v number;
11 fyearst_v date;
12 fyeared_v date;
13 totaldays_V number;
14 i number;
15 d number;
16 begin
17 fyearst_v := '05-jan-2004';
18 fyeared_v := '26-jan-2004';
19 sdate := fyearst_v;
20 transyear_v := to_char('05-jan-2004','yyyy');
21 nweek_v :=1;
22 ndays_v := 5;
23 totaldays_v := to_number(to_date(fyeared) - to_date(fyearst));
24 nweekid_v :=1;
25 i := 1;
26 loop
27 If to_char(fyearst_v,'DAY') ='MONDAY ' then
28 loop
29 i := i + 4;
30 if i < totaldays_v then
31 d := to_number(totaldays_v - i);
32 edate_v := (sdate_v + (d - 1));
33 elseif i = totaldays_v then
34 edate_v := sdate_v + 4;
35 elseif i < totaldays then
36 edate := (sdate + 4);
37 endif;
38 weekid_v := (i||'000'||'i');
39 insert into weeks(weekid, transaction_year, start_date, end_date, days, week_number)
40 values(weekid_v,transyear, sdate_v, ndays, nweek_v);
41 if totaldays_V > 7 then
42 weekid_v := weekid + 1;
43 sdate_v := sdate_v + 7;
44 transyear_V := transyear_v;
45 nweek_v := nweek_v + 1;
46 ndays_v := ndays_v;
47 totaldays_v := to_number(totaldays_v - 7);
48 else exit;
49 end loop;
50 else exit;
51 end loop;
52 end;
53 END;
54 /
Warning: Procedure created with compilation errors.
SQL> sho err;
Errors for PROCEDURE WEEKSINYEAR:
LINE/COL ERROR
33/35 PLS-00103: Encountered the symbol "I" when expecting one of the
following:
:= . ( @ % ;
35/35 PLS-00103: Encountered the symbol "I" when expecting one of the
following:
:= . ( @ % ;
49/23 PLS-00103: Encountered the symbol "LOOP" when expecting one of
the following:
if
LINE/COL ERROR
51/17 PLS-00103: Encountered the symbol "LOOP" when expecting one of
the following:
if
SQL>So many things, I don't really know where to start.
At line 32
IF TO_CHAR(fyearst,'DAY') ='MONDAY ' then
Will never be true it needs to be either
IF TO_CHAR(fyearst,'DAY') ='MONDAY ' THEN -- A total of 9 characters (padded to the length of WEDNESDAY) or
IF TRIM(TO_CHAR(fyearst,'DAY')) ='MONDAY' THEN
Fixing this leads to a second problem in the inner loop. At line 35
IF i < totaldays THEN
is logically incorrect. The variable i will take the values 5, 9, 13, 17 and enter the if condition, but will not be equal to totaldays at line 38. On the fifth iteration i = 21 so the conditional at line 35 fails and you have an infinite loop, so the test needs to be:
IF i <= totaldays THEN
to even get into any of your processing. Now, on the fifth pass, the conditional on line 38 (IF i = totaldays THEN ) will be true, so edate gets set, but the condition on line 40 (IF i > totaldays THEN) can never be true, so we're back to an infinite loop.
So change line 40 to
IF i >= totaldays THEN
Now, the insert gets done, and the test at line 45 (IF totaldays > 7 THEN) passes and totaldays gets reset, and we go back to the top of the inner loop. Now, i = 21 and totaldays = 14, so the condition at line 35 fails, and again, we're in an infinite loop, so lets reset i as well as totaldays.
Now i still goes 5, 9, 13, 17, 21 but totaldays = 14, so the test at line 38 is never true, and once more, an infinite loop.
At this point I gave up and put an explicit exit after the insert statement, just to see what should be inserted, and got another infinite loop in the outer loop because there is no terminating condition on the loop since fyearst never gets changed. Having seen some output, I think what you are looking for is something more like:
INSERT INTO weeks
SELECT rownum, TO_CHAR(TO_DATE('05-jan-2004','dd-mon-yyyy'),'YYYY'),
NEXT_DAY(TO_DATE('05-jan-2004','dd-mon-yyyy') - 7,'MONDAY') + ((rownum - 1) * 7),
NEXT_DAY(TO_DATE('05-jan-2004','dd-mon-yyyy') + 1,'FRIDAY') + ((rownum - 1) * 7),
'5', TO_CHAR(rownum)
FROM all_objects
WHERE rownum <= 52or, if you really want a procedure:
CREATE OR REPLACE PROCEDURE weeksinyear (p_start IN DATE, p_end IN DATE) AS
num_weeks NUMBER;
BEGIN
num_weeks := (NEXT_DAY(p_end,'MONDAY') - NEXT_DAY(p_start - 7,'MONDAY')) /7;
INSERT INTO weeks
SELECT rownum, TO_CHAR(p_start,'YYYY'),
NEXT_DAY(p_start - 7,'MONDAY') + ((rownum - 1) * 7),
NEXT_DAY(p_start + 1,'FRIDAY') + ((rownum - 1) * 7),
'5', TO_CHAR(rownum)
FROM all_objects
WHERE rownum <= num_weeks;
COMMIT;
END;If you will always want to do this for an entire year, then the procedure could be simplified to:
CREATE OR REPLACE PROCEDURE weeksinyear (p_start IN DATE) AS
BEGIN
INSERT INTO weeks
SELECT rownum, TO_CHAR(p_start,'YYYY'),
NEXT_DAY(p_start - 7,'MONDAY') + ((rownum - 1) * 7),
NEXT_DAY(p_start + 1,'FRIDAY') + ((rownum - 1) * 7),
'5', TO_CHAR(rownum)
FROM all_objects
WHERE rownum <= 52;
COMMIT;
END;TTFN
John -
Hello,
i got PLS-00435 when compiling the following procedure:
create or replace type marire_ob is object(id_dept number, salariu number)
create or replace type marire_angajati is table of marire_ob;
create or replace procedure proc_upd_salary (mariri marire_angajati) is
cursor cr_angajati(p_id_dept number) is
select * from employees where department_id=p_id_dept;
type angajati is table of cr_angajati%rowtype;
i_angajati angajati;
begin
for i in mariri.first..mariri.last loop
open cr_angajati(mariri(i).id_dept);
fetch cr_angajati bulk collect into i_angajati;
forall k in i_angajati.first..i_angajati.last
update employees set salary = salary + mariri(i).salariu
where employee_id= 1222;
--and salary<salariu_exc;
end loop;
close cr_angajati;
end;Compilation errors for PROCEDURE FLORINP.PROC_UPD_SALARY
Error: PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
Line: 12
employees is from HR schema
Please help..
Regards,
Edited by: Talkabout23 on 24-Jul-2009 02:12in the update statement? is it obligatory to use it?
create or replace procedure proc_upd_salary (mariri marire_angajati) is
cursor cr_angajati(p_id_dept number) is
select * from myemps where department_id=p_id_dept;
type angajati is table of cr_angajati%rowtype;
i_angajati angajati;
begin
for i in mariri.first..mariri.last loop
open cr_angajati(mariri(i).id_dept);
fetch cr_angajati bulk collect into i_angajati;
forall k in i_angajati.first..i_angajati.last
update myemps set salary = salary + mariri(i).salariu
where employee_id= mariri(k);
--and salary<salariu_exc;
end loop;
close cr_angajati;
end;now i got
Compilation errors for PROCEDURE FLORINP.PROC_UPD_SALARY
Error: PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got FLORINP.MARIRE_OB
Line: 13
Error: PL/SQL: SQL Statement ignored
Line: 12
Edited by: Talkabout23 on 24-Jul-2009 02:41 -
PLS-00907 Error but referenced package compiled
Hi I am experiencing some problems with Database Link.
In DEV Environment,
I have two database, DB A and DB B.
In DB A I have package name SUPPORT_PKG and inside it I have a function named HISTORY_UPDATE.
Package is compiled correctly in DB A and working fine.
I created a procedure CALL_HIST_UPD in DB B to execute SUPPORT.PKG.HISTORY_UPDATE@A through DB LINK.
and it gave me PLS-00907 error.
UAT environment has the same setup of user and package as DEV.
then I tried to copy the CALL_HIST_UPD to DB B in UAT and it can be compiled sucessfully in UAT.so I do the following
Back to Dev again
I tried to figure what's going on until I decided to replace the header specification SUPPORT.PKG.HISTORY_UPDATE
with the declaration part from the body and recompiled the whole package again, and this time I can compile the procedure in DB B.
I am curious and check the header in UAT and found that UAT Headers is the same exactly with the DEV Headers
before I replaced it with the new one by copying from the body. I am curious why the DEV environment give the PLS-00907 error at the first time, even at that time package in A are compiled nicely.
Let me know if the question is not clear.
thanks for your helpTry this -
CREATE OR REPLACE PACKAGE data_mgmt AUTHID CURRENT_USER
IS
FUNCTION hy_name (in_dt DATE, in_option_txt VARCHAR2)
RETURN VARCHAR2;
END data_mgmt;
CREATE OR REPLACE PACKAGE BODY data_mgmt
IS
FUNCTION hy_name (in_dt DATE, in_option_txt VARCHAR2)
RETURN VARCHAR2
IS
return_txt VARCHAR2 (25);
BEGIN
RETURN return_txt;
END hy_name;
END data_mgmt;
/ -
Hi to All,
While creating a procedure I got a "ORA-00942: table or view does not exist" the table is there I can do a describe do a select, but some reason it does not see it if referenced in the procedure, if I use the same statement in "DECLARE" instead of "CREATE OR REPLACE" it sees the table and no error is given.
Below is the code:
FFS> DESC STE_V1SITE
Name
SITE_ID_NU
ST_NU
SITE_NU
SITE_FMLY_ID_NU
PRE_SITE_ID_NU
SITE_DS
FFS> CREATE OR REPLACE PROCEDURE temp IS
2
3 CURSOR site_ds_cur (
4 P_site_id IN NUMBER
5 , P_Thru_Dt IN DATE
6 ) IS
7 SELECT site.site_ds
8 FROM ste_v1site site
9 WHERE site.site_id_nu = P_site_id ;
10
11 TYPE site_ds_typ IS
12 TABLE OF ste_v1site.site_ds%TYPE
13 INDEX BY BINARY_INTEGER;
14
15 site_ds_tbl site_ds_typ;
16
17 BEGIN
18 NULL;
19
20 END;
21 /
Warning: Procedure created with compilation errors.
FFS> SHO ERROR
Errors for PROCEDURE TEMP:
LINE/COL ERROR
7/3 PL/SQL: SQL Statement ignored
8/10 PL/SQL: ORA-00942: table or view does not exist
11/3 PL/SQL: Item ignored
12/12 PLS-00201: identifier 'STE_V1SITE' must be declared
FFS>
FFS> DECLARE
2 CURSOR site_ds_cur (
3 P_site_id IN NUMBER
4 , P_Thru_Dt IN DATE
5 ) IS
6 SELECT site.site_ds
7 FROM ste_v1site site
8 WHERE site.site_id_nu = P_site_id ;
9
10 TYPE site_ds_typ IS
11 TABLE OF ste_v1site.site_ds%TYPE
12 INDEX BY BINARY_INTEGER;
13
14 site_ds_tbl site_ds_typ;
15
16 BEGIN
17 NULL;
18 END;
19 /
PL/SQL procedure successfully completed.
FFS> CREATE OR REPLACE PROCEDURE temp IS
2 BEGIN
3 NULL;
4 END;
5 /
Procedure created.
Thanks to all those who provide help...
Habeebsomthing like this
SQL> declare
2 cursor c(pdeptno number) is select empno,ename from emp
3 where deptno=pdeptno;
4 begin
5 for i in c(10) loop
6 dbms_output.PUT_LINE(i.empno||' : '||i.ename);
7 end loop;
8 end;
9 /
7782 : CLARK
7839 : KING
7934 : MILLER
PL/SQL procedure successfully completed. -
Hi,
I am creating the procedure but getting the following error. I could not identify where the exact problem at line 5:
Oracle 11.2.0
SQL> CREATE OR REPLACE PROCEDURE BEDPOST_SATYA
2 (TRANDATE OUT BEDPOSTCHECK.TRANDATE%TYPE,
3 NOS OUT BEDPOSTCHECK.NOS%TYPE,
4 UNIT OUT BEDPOSTCHECK.TRANDATE%TYPE,
5 TDATE VARCHAR2(20);)
6 AS
7 Select to_char(SYSDATE-1,'YYYYMMDD') into TDATE from dual;
8 cursor satya is
9 select trandate,nos,unit from bedpostcheck where trandate=tdate;
10 begin
11 open satya;
12 loop
13 fetch satya
14 into trandate,nos,unit;
15 exit when satya%notfound;
16 dbms_output.put_line (trandate || unit || nos);
17 end loop
18 close satya;
19 END BEDPOST_SATYA;
20 /
Warning: Procedure created with compilation errors
SQL> SHOW ERRORS;
Errors for PROCEDURE JEEVADB.BEDPOST_SATYA:
LINE/COL ERROR
5/15 PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character
thanks
satyauser608405 wrote:
I have modified but getting the following errors:
SQL> CREATE OR REPLACE PROCEDURE BEDPOST_SATYA
2 (TRANDATE OUT BEDPOSTCHECK.TRANDATE%TYPE,
3 NOS OUT BEDPOSTCHECK.NOS%TYPE,
4 UNIT OUT BEDPOSTCHECK.TRANDATE%TYPE,
5 TDATE VARCHAR2(20))
6 AS
7 Select to_char(SYSDATE-1,'YYYYMMDD') into TDATE from dual;
8 cursor satya is
9 select trandate,nos,unit from bedpostcheck where trandate=tdate;
10 begin
11 open satya;
12 loop
13 fetch satya
14 into trandate,nos,unit;
15 exit when satya%notfound;
16 dbms_output.put_line (trandate || unit || nos);
17 end loop
18 close satya;
19 END BEDPOST_SATYA;
20 /
Warning: Procedure created with compilation errors
SQL> show errors;
Errors for PROCEDURE JEEVADB.BEDPOST_SATYA:
LINE/COL ERROR
5/15 PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
7/1 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: begin function pragma procedure subtype type <an identifier> <a double-quoted delimited-identifier> current cursor delete exists prior external language The symbol "begin" was substituted for "SELECT" to continue.
8/8 PLS-00103: Encountered the symbol "SATYA" when expecting one of the following: := . ( @ % ;try this or the prior posting that i have.
CREATE OR REPLACE PROCEDURE BEDPOST_SATYA (TRANDATE OUT BEDPOSTCHECK.TRANDATE%TYPE,
NOS OUT BEDPOSTCHECK.NOS%TYPE,
UNIT OUT BEDPOSTCHECK.TRANDATE%TYPE) As
cursor satya is
select trandate,nos,unit
from bedpostcheck
where trandate = (SYSDATE-1,'YYYYMMDD');
begin
open satya;
loop
fetch satya into trandate, nos, unit;
exit when satya%notfound;
dbms_output.put_line (trandate || unit || nos);
end loop;
close satya;
END BEDPOST_SATYA;
/ -
While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.
I faced the same issue. This solved it for me: Troubleshooting issues with iTunes for Windows updates
Hope this helps. -
I have Windows Vista computer. I am trying to upgrade my ITunes so can share files with other home computer. (Just got the new IPhone). I get this system error: The procedure entry point AVCFPlayerItemDurationChangedNotification could not be located in the dynamic link library AVFoundationCF.dll. Tries system restore and redownloaded...NOW Itunes will not even open. Can anyone help?
I uninstalled Apple Application Support, opened iTunesSetup with WinRar, and went down the list of msi's. AppleApplicationSupport was an install, all the others I did Repair. Did not have to reboot. Works okay now.
HTH -
I am trying to build an executible program that will be portable to machines which do not have CVI installed. It works fine on my CVI v9.1 system. However, whether or not I include "Full run-time support" in the build options, I get the error "The procedure entry point _UP_GetActiveTreeCell could not be located in the dynamic link library cvirte.dll" when I try to run it on a machine without CVI. Please help.
To run a CVI application on a system were the CVI IDE is not installed you need to have the CVI RunTime Engine installed. According to the error message at the bottom of this page you may have an older RTE installed in the target system.
To obtain it you can either download the RTE and install in the target system or better let the IDE build a distribution disk that installs all necessary software in it: this guide drives you in creating the appropriate installer for your application: you can find it also in CVI help function.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Can't launch itunes due to the following error; The procedure entry point AVCFPlayerAppliesMediaSelectionCriteriaKey could not be located in the dynamic link library AVFoundationCF.dll.
Hey bcolden,
I would try uninstalling and reinstalling following the directions in here:
Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
http://support.apple.com/kb/HT1923
This section in particular contains important information in the uninstall process:
Use the Control Panel to uninstall iTunes and related software components in the following order and then restart your computer:
iTunes
Apple Software Update
Apple Mobile Device Support
Bonjour
Apple Application Support (iTunes 9 or later)
Important: Uninstalling these components in a different order, or only uninstalling some of these components may have unintended affects.
Let us know if following that article and uninstalling those components in that order helped the situation.
Welcome to Apple Support Communities!
Best,
Delgadoh -
REPLICAT ERROR(The procedure entry point long jmp could not be located )
Hi,
I am getting the following error
The procedure entry point long jmp could not be located in the dynamic link library orauts.dll
Does anyone know anything about this? please help.
Thanks
Vi googled to the solution before i got to the answer but thanks anyway... you are right i changed my oracle home yesterday...today i had to reset to make this work...
Thanks
Venkat
Maybe you are looking for
-
Major Problem: Safari won't open
Hi, Safari keeps quitting as soon as I try to open it and I don't know how to fix it. I have repaired permissions and opened in Safe Mode and reset Safari but it still won't open, so it won't send this to Apple either. Below is the report. Please can
-
Problem with Configurator - Cannot Update Item Attributes for a Config item
Hi! We configured an item to reproduce the following feature of Oracle Configurator in our business case (Oracle Configurator Modeling Guide - 115czmod.pdf): «For example, if you have raw materials that are ordered by lengths, do not create an item f
-
My itunes wont load up on my computer? ity worked fine last time
i tried to start Itunes on my computer it wont load up?
-
Connecting new IPOD touch to a car (USB)
Hi Guys, Saw the issues over the popping issue, However I cannot even get my car to recognise my device? . My old IPOD worked fine plug & play . I thought the same would be for this . I have attempted to use the USB in my car ( Mecredes ) and it read
-
Rman archive logs deltion question..
Hi All, What's the best way to delete archive logs that have been backed up by RMAN? Is there a preferred way? We are looking at the 2 scripts below: run { allocate c