PLS-00357 error
I have created MView under report_owner schema and like to refresh the MView via scheduler job and the MView won't get refreshed.i am getting this errors.
ORA-12012: error on auto execute of job 135426
ORA-06550: line 1, column 402:
PLS-00357: Table,View Or Sequence reference 'REPORT_OWNER.M_REP_01'
SQL> l
1 BEGIN
2 sys.dbms_scheduler.create_job(
3 job_name => '"SYSTEM"."REFRESH_MVIEWS"',
4 job_type => 'PLSQL_BLOCK',
5 job_action => 'BEGIN
dbms_mview.refresh(list=>"REPORT_OWNER"."M_REP_01");END;',
6 job_class => 'AUTO_TASKS_JOB_CLASS',
7 start_date => SYSTIMESTAMP,
8 repeat_interval => 'FREQ=MINUTELY',
9 end_date => NULL,
10 enabled => TRUE,
11 comments => 'To refresh REPORT_OWNER schema MViews');
12* END;
SQL> /
PL/SQL procedure successfully completed.
So what is the problem ??
Hi,
may be that
dbms_mview.refresh(list=>"REPORT_OWNER"."M_REP_01");END;',should be
dbms_mview.refresh(list=>''REPORT_OWNER.M_REP_01'');END;',so the problem is just for the wrong usage of quotes?
Max
Similar Messages
-
Pass table name as parameter PLS-00357
create or replace
PROCEDURE universal_p (
tab IN VARCHAR2,
col IN VARCHAR2,
whr IN VARCHAR2 := NULL)
IS
TYPE cv_type IS REF CURSOR;
cv cv_type;
val VARCHAR2(32767);
BEGIN
OPEN cv FOR
'SELECT ' || col ||
' FROM ' || tab ||
' WHERE ' || NVL (whr, '1 = 1');
LOOP
FETCH cv INTO val;
EXIT WHEN cv%NOTFOUND;
IF cv%ROWCOUNT = 1
THEN
DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
DBMS_OUTPUT.PUT_LINE (
'Contents of ' ||
UPPER (tab) || '.' || UPPER (col));
DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
END IF;
DBMS_OUTPUT.PUT_LINE (val);
END LOOP;
CLOSE cv;
END;
WHEN I CALL THIS PROCEDURE I got error messasge
ORA-06550: Table,View Or Sequence reference not allowed in this context.
PLS-00357:
Can anyone can help me, please ?
WHEN
Edited by: user6446424 on 11.3.2010 13:59Works for me:
SQL> create or replace
2 PROCEDURE universal_p (
3 tab IN VARCHAR2,
4 col IN VARCHAR2,
5 whr IN VARCHAR2 := NULL)
6 IS
7 TYPE cv_type IS REF CURSOR;
8 cv cv_type;
9 val VARCHAR2(32767);
10 BEGIN
11 OPEN cv FOR
12 'SELECT ' || col ||
13 ' FROM ' || tab ||
14 ' WHERE ' || NVL (whr, '1 = 1');
15
16 LOOP
17 FETCH cv INTO val;
18 EXIT WHEN cv%NOTFOUND;
19 IF cv%ROWCOUNT = 1
20 THEN
21 DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
22 DBMS_OUTPUT.PUT_LINE (
23 'Contents of ' ||
24 UPPER (tab) || '.' || UPPER (col));
25 DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
26 END IF;
27 DBMS_OUTPUT.PUT_LINE (val);
28 END LOOP;
29
30
31 CLOSE cv;
32 END;
33
34 /
Procedure created.
SQL> exec universal_p('EMP','ENAME')
Contents of EMP.ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
PL/SQL procedure successfully completed.
SQL> select * from v$version
2 ;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - ProductionMax
http://oracleitalia.wordpress.com -
PLS-00357: Table,View Or Sequence reference 'A' not allowed in this context
Hello
I am accepting input values from users through java web page. To accept the values I am using the following code:
import java.sql.*;
import javax.sql.DataSource;
import javax.naming.*;
public class spsrch
public void spsrch()
public String espsrch(String p, String d, String a)
String s1= "";
String strColor="#C0C0C0";
try
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Oracle9i");
Connection Con = ds.getConnection();
Statement stmt = Con.createStatement();
CallableStatement proc1stmt1=Con.prepareCall ("{call Allsch("+p+","+d+")}");
// ResultSet rs = proc1stmt1.execute();
proc1stmt1.executeUpdate();
Con.close();
catch(Exception e)
System.out.println("Flag Raised"+e);
return s1;
I am calling the procedure 'Allsch' to apply some logic before inserting data into a SQL table.
The 'Allsch' procedure is :
create or replace procedure tmpsch(pno varchar2,pdes varchar2) as
mpartnum varchar2(30);
mpn varchar2(30);
mdes varchar2(150);
cursor c1 is select partnum,description,aircraft_type from master_catalog where description like ltrim(rtrim(mdes))||'%' AND partnum like mpn||'%';
cursor c2 is select partnum from ipc_master where partnum=mpartnum;
cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
cursor c4 is select partnum from superparts where partnum=mpartnum;
cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
mpno1 varchar2(30);
mpno2 varchar2(30);
mpno3 varchar2(30);
mpno4 varchar2(30);
mpno5 varchar2(30);
mdescription varchar2(150);
maircraft_type varchar2(15);
mstat varchar2(1);
mstat1 varchar2(30);
mstat2 varchar2(30);
mstat3 varchar2(30);
mstat4 varchar2(30);
begin
mstat:='N';
mpn:=pno;
mdes:=pdes;
for i in c1 loop
mstat:='N';
mstat1:='N';
mstat2:='N';
mstat3:='N';
mstat4:='N';
mpno1:=i.partnum;
mpartnum:=i.partnum;
mdescription:=i.description;
maircraft_type:=i.aircraft_type;
for j in c2 loop
mpno2:=j.partnum;
end loop;
for k in c3 loop
mpno3:=k.partnum;
end loop;
for l in c4 loop
mpno4:=l.partnum;
end loop;
for m in c5 loop
mpno5:=m.part_no;
end loop;
if mpno2=mpartnum then
mstat1:=mpno2;
end if;
if mpno3=mpartnum then
mstat2:=mpno3;
end if;
if mpno4=mpartnum then
mstat3:=mpno4;
end if;
if mpno5=mpartnum then
mstat4:=mpno5;
end if;
if mpno1=mpartnum then
mstat:='Y';
insert into tmpcat values(mpno1,mdescription,maircraft_type,mstat1,mstat2,mstat3,mstat4);
end if;
end loop;
end;
Java program compiling time, it not showing any error. But after executing, it is not inserting any data into 'tmpcat' table and throwing the following error :
Flag Raisedjava.sql.SQLException: ORA-06550: line 1, column 14:
PLS-00357: Table,View Or Sequence reference 'A' not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
[07/22/03 11:47:38][executor-0][W]: Handling error; throwable is "null", status
code is "404" and message is "Not Found: /User/Ecatalog/Validations.js".
[07/22/03 11:47:38][executor-0][W]: Handling error; throwable is "null", status
code is "404" and message is "Not Found: /User/Ecatalog/Validations.js".
Any one please help me to solve the issue.
With thanks
Pramod kumar.
My Email-id is : [email protected]What are p and d in
"{call Allsch("+p+","+d+")}"
Something tells me you might need some quotes in this statement since they are varchar2. Maybe
"{call Allsch('"+p+"','"+d+"')}"
If this doesn't work try to cut off parts of the procedure until it works.
Mike -
Hai
I created sequence
create sequence emp_seq startwith 800 increment by 1 maxvalues 1000;
and emp table is empty.I want to set module information into v$session by dbms_application_info package.According to that i created procedure sucessufully ,i got the below error when executing the procedure
SQL> CREATE OR REPLACE PROCEDURE ADD_EMPLOYEE(NAME VARCHAR2,SALARY NUMBER,MANAGER NUMBER,TITLE VARCH
AR2,COMMISSION NUMBER,DEPARTMENT NUMBER) AS
2 BEGIN
3 DBMS_APPLICATION_INFO.SET_MODULE(MODULE_NAME=> 'ADD_EMPLOYEE', ACTION_NAME=>'INSERT INTO EMP');
4 INSERT INTO EMP(EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES(EMP_SEQ.NEXTVAL,NAME,TITLE
,MANAGER,SYSDATE,SALARY,COMMISSION,DEPARTMENT);
5 DBMS_APPLICATION_INFO.SET_MODULE('' , '');
6 END
7
8 ;
9 /
Procedure created.
EXEC ADD_EMPLOYEE (EMP_SEQ.NEXTVAL,'MOHAN1', 'SYSTEM',7902,TO_DATE('17-DEC-1980','DD-MON-YYYY')
, 800,NULL, 20);
BEGIN ADD_EMPLOYEE (EMP_SEQ.NEXTVAL,'MOHAN1', 'SYSTEM',7902,TO_DATE('17-DEC-1980','DD-MON-YYYY'), 80
ERROR at line 1:
ORA-06550: line 1, column 29:
PLS-00357: Table,View Or Sequence reference 'EMP_SEQ.NEXTVAL' not allowed in
this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignoredThe input parameters that are listed in the procedure and the input parameters that you pass to the procedure when you execute it have to be in the same order. Also, you should not try to pass emp_seq.NEXTVAL or SYSDATE to the procedure. In the following, I changed the order of the input parameters to match the order of the parameters you were passing to it. I also removed the emp_seq.NEXTVAL and the date from the list of parameters passed to the procedure upon execution.
CREATE SEQUENCE emp_seq
START WITH 800
INCREMENT BY 1
MAXVALUE 1000
Sequence created.
CREATE OR REPLACE PROCEDURE add_employee
(name VARCHAR2,
title VARCHAR2,
manager NUMBER,
salary NUMBER,
commission NUMBER,
department NUMBER)
AS
BEGIN
DBMS_APPLICATION_INFO.SET_MODULE
(MODULE_NAME => 'ADD_EMPLOYEE',
ACTION_NAME => 'INSERT INTO EMP');
INSERT INTO EMP
(empno,
ename,
job,
mgr,
hiredate,
sal,
comm,
deptno)
VALUES
(emp_seq.NEXTVAL,
name,
title,
manager,
SYSDATE,
salary,
commission,
department);
DBMS_APPLICATION_INFO.SET_MODULE ('' , '');
END add_employee;
Procedure created.
SHOW ERRORS
No errors.
EXECUTE add_employee ('MOHAN1', 'SYSTEM', 7902, 800, NULL, 20)
PL/SQL procedure successfully completed. -
Re: PLS-00357 Table,View Or Sequence reference 'string' not allowed in this con
i have the same problem , can somebod help
i pasting my code here , please help me resolving
SQL> declare
2 continue char(1):='y';
3 begin
4 while(continue='y')
5 loop
6 dbms_output.put_line('somen');
7 dbms_output.put_line('do u wan continue');
8 continue:=to_char(&continue);
9 end loop;
10 end;
11 /
Enter value for continue: y
old 8: continue:=to_char(&continue);
new 8: continue:=to_char(y);
continue:=to_char(y);
ERROR at line 8:
ORA-06550: line 8, column 19:
PLS-00357: Table,View Or Sequence reference 'Y' not allowed in this context
ORA-06550: line 8, column 1:
PL/SQL: Statement ignoredJust to emphasise Sven's point that the substitution variable (&continue) is resolved once and "compiled" into the code, try making a stored procedure instead of an anonymous block.
SQL> create procedure p as
2 continue char(1):='y';
3 begin
4 while(continue='y') loop
5 dbms_output.put_line('somen');
6 dbms_output.put_line('do u wan continue');
7 continue:=('&continue');
8 end loop;
9 end;
10 /
Enter value for continue: q
old 7: continue:=('&continue');
new 7: continue:=('q');
Procedure created.
SQL> select text from user_source
2 where name = 'P'
3 order by line;
TEXT
procedure p as
continue char(1):='y';
begin
while(continue='y') loop
dbms_output.put_line('somen');
dbms_output.put_line('do u wan continue');
continue:=('q');
end loop;
end;
Note that where you had the substitution variable, there is now a literal value, q in my case. Note that because I did not respond with y for the value of continue I can safely run this procedure.
SQL> exec p;
somen
do u wan continue
PL/SQL procedure successfully completed.
John -
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;
/ -
Getting pls-00428 error.
Hi all,
I'm trying to fix some invalid objects in our 11g database and i'm getting a pls-00428 error. Not sure where the issue is originating at (keep in mind, my IT team and I are not thoroughly experienced with 11g, so I apologize if this sounds a little too newbie-ish)
Here's the plsql:
create or replace
FUNCTION detail_cogs (
sSKU varchar2
--,dtFrom date := sysdate
return number
is
nRetval number;
begin
select *
--SUM(cost * ieqty) into nRetval
from (
select
ie.qty ieqty
,ie.part
,ic.validdate
,ic.cost
,LAG(validdate) OVER (partition by ic.part order by validdate desc) prev_entry_time
from
oracle2_partexplosion_mv ie
,oracle2_itemcogs_mv ic
where
ie.sku = sSKU
and ic.part = ie.part
and ic.validdate <= sysdate
order by part, validdate desc
where
prev_entry_time is null;
return nRetval;
exception
when others then
return null;
end;Welcome to the forum.
Reading the documentation will save you:
PLS-00428: an INTO clause is expected in this SELECT statement
Cause: The INTO clause of a SELECT INTO statement was omitted. For example, the code might look like SELECT deptno, dname, loc FROM dept WHERE ... instead of SELECT deptno, dname, loc INTO dept_rec FROM dept WHERE ... In PL/SQL, only a subquery is written without an INTO clause.
http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/pcmus.htm#sthref17855
http://www.oracle.com/pls/db112/search?word=select+into&partno=e10472
Doc home: http://www.oracle.com/pls/db112/homepage
And please change or remove this part from your code anyway, since it's nothing but a bug:
exception
when others then
return null;11g compiler warned you already about that, I may hope... -
PLS-00428 Error when creating a new trigger
Hi,
I'm encountering the PLS-00428 error when I run the script below.
CREATE OR REPLACE TRIGGER TIBCOUSER.po_response_trigger
BEFORE INSERT ON po_response FOR EACH ROW
BEGIN
IF:NEW.ariba_processsequence is null then
SELECT pttransid AS pttransid, 'Product Test Pass 1' AS pttransname, aribaorderid AS aribaorderid, '0' AS errorcode, '' AS MESSAGE, SYSDATE AS ariba_insertdate
FROM po_request
WHERE adb_l_delivery_status = 'N';
UPDATE po_request
SET adb_l_delivery_status = 'C'
WHERE adb_l_delivery_status = 'N';
END IF;
END;
Can someone point out what is missing or what is wrong with the script? Any help would be much appreciated.
Regards,
JiggerHi Jigger,
I was able to create the trigger using the script below.That's nice, you got the trigger created. Below is your trigger, I have added some comments.
create or replace trigger tibcouser.po_response_trigger
before insert or update
on po_response
for each row
declare
-- 1. These variables should really be anchored to po_response
-- 2. They should be named differently than columns in po_response
-- 3. It seems that you don't need them (See 7.)
pttransid integer := null;
pttransname varchar2(255) := null;
aribaorderid varchar2(255) := null;
errorcode integer := null;
message varchar2(255) := null;
ariba_insertdate date := null;
adb_l_delivery_status char(1) := null;
begin
-- 4. This is never true, since adb_l_delivery_status is null, here
-- So, I guess your trigger never does anything, so in a sense it works
if (adb_l_delivery_status = 'N')
then
-- 5. This select will raise too_many_rows, when there is more than one record in po_response.
-- 6. It seems you will have a problem with mutating table
-- 7. The select doesn't do anything, you never use any of the values selected
-- 8. The select is confusing, since variables are named equally to columns
-- 9. You select constants, why not just assign them right away
select pttransid
,pttransname
,aribaorderid
,'0'
,sysdate
into pttransid
,pttransname
,aribaorderid
,errorcode
,message
,ariba_insertdate
from po_response;
-- 10. This update will update ALL records in po_request, probably not what you want.
update po_request
set adb_l_delivery_status = 'C';
end if;
-- 11. Good practise dictates end po_response_trigger;
end;
/In general, when you think your post has been answered, then kindly mark it as such.
Regards
Peter -
PLS-00201 error calling function in package member
Hello,
I'm trying to call a function defined in a PL/SQL package, but receiving a PLS-00201 error.Sorry, a finger-controller error caused me to submit before I was ready. I'm having the module replaced today. :)
After rethinking my decision to post here, I decided not to. I've never received a helpful answer, probably because the issues are not simple... Too bad. -
How to fix the PLS-00123 error?
I construct about the oracle spatial sql as follow:
declare
ord sdo_ordinate_array := sdo_ordinate_array();
begin
begin for i IN 1 ..5624 LOOP
ord extend;
end LOOP;
ord(1) := number1;
ord(2) := number2;
ord(3) := number3;
ord(4) := number4;
insert into table(shape,....) values(SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),ord));
END;
Because the count of geometry node is very long. I got the PLS-00123 error when I execute the state? somebody help me fix the problem?????
Message was edited by:
user646459It seems more on PL/SQL error to me. Have you posted your question in PL/SQL forum?
Ming Man -
Cyclic PLS-00538 and PLS-00539 errors?
I've defined a supertype, t_cliente, and derived two subtypes, t_cliente_pers and t_cliente_soc. The first one has 6 member functions and the latter ones override only two of them.
Every time I launch the script for creation I get PLS-00538 and PLS-00539 errors, but I'm not able to find out why.
The explanation for PLS-00538 is: subprogram or cursor "string" is declared in an object type specification and must be defined in the object type body.
For PLS-00539 is: subprogram "string" is declared in an object type body and must be defined in the object type specification.
It's a cycle! And after all I defined these 2 functions in type specification and type body.
I'm using 10g XE. Here's the code:
create TYPE t_indirizzo AS OBJECT (
via VARCHAR(45),
numero NUMBER(4),
cap INTEGER(5),
citta VARCHAR(30),
provincia VARCHAR(30),
regione VARCHAR(30),
MEMBER FUNCTION indirizzoCompleto RETURN VARCHAR
create TYPE t_telefono AS OBJECT (
num_tel NUMBER(15)
create TYPE t_telefono_array IS VARRAY(3) OF t_telefono
create TYPE t_anagrafica AS OBJECT (
nome VARCHAR(45),
cognome VARCHAR(45),
sesso CHAR(1),
cod_fiscale VARCHAR(16),
data_nascita DATE
create TYPE t_ragioneSociale AS OBJECT (
nome_soc VARCHAR(45),
data_cost DATE,
part_iva NUMBER(11)
create TYPE t_persona AS OBJECT (
dati_anagrafici t_anagrafica,
indirizzo t_indirizzo,
email VARCHAR(45),
telefono t_telefono_array
create TYPE t_societa AS OBJECT (
ragione_sociale t_ragioneSociale,
indirizzo t_indirizzo,
email VARCHAR(45),
telefono t_telefono_array,
persona_rif REF t_persona
create TYPE t_cliente AS OBJECT (
cod_cliente NUMBER(8),
MEMBER FUNCTION incFatti RETURN NUMBER,
MEMBER FUNCTION incSubiti RETURN NUMBER,
MEMBER FUNCTION incFattiPeriodo RETURN NUMBER, /* this is the first function that gives me problems */
MEMBER FUNCTION incSubitiPeriodo RETURN NUMBER, /* this is the second one */
MEMBER FUNCTION nomeCliente RETURN VARCHAR,
MEMBER FUNCTION tipoCliente RETURN VARCHAR
) NOT FINAL
create or replace
TYPE BODY t_cliente AS
MEMBER FUNCTION incFatti RETURN NUMBER
IS incidenti NUMBER;
BEGIN
SELECT count(i. cod_incidente) INTO incidenti
FROM incidente i, mezzo m
WHERE SELF.cod_cliente = m.proprietario.cod_cliente AND m.num_targa = i.mezzo. num_targa AND i. responsabilita = 'c';
RETURN (incidenti);
END;
MEMBER FUNCTION incSubiti RETURN NUMBER
IS incidenti NUMBER;
BEGIN
SELECT count(i. cod_incidente) INTO incidenti /* here's the first PLS-00538 error */
FROM incidente i, mezzo m /* here's the second PLS-00538 error */
WHERE SELF.cod_cliente = m.proprietario.cod_cliente AND m.num_targa = i.mezzo. num_targa AND i. responsabilita = 's';
RETURN (incidenti);
END;
MEMBER FUNCTION incFattiPeriodo(da DATE, a DATE) RETURN NUMBER /* here's the first PLS-00539 error */
IS incidenti NUMBER;
BEGIN
SELECT count(i. cod_incidente) INTO incidenti
FROM incidente i , mezzo m
WHERE SELF. cod_cliente = m.proprietario.cod_cliente AND m. num_targa = i.mezzo. num_targa AND i. responsabilita = 'c' AND (i.data_inc BETWEEN da and a);
RETURN (incidenti);
END;
MEMBER FUNCTION incSubitiPeriodo(da DATE, a DATE) RETURN NUMBER /* here's the second PLS-00539 error */
IS incidenti NUMBER;
BEGIN
SELECT count(i. cod_incidente) INTO incidenti
FROM incidente i , mezzo m
WHERE SELF. cod_cliente = m.proprietario.cod_cliente AND m. num_targa = i.mezzo. num_targa AND i. responsabilita = 's' AND (i.data_inc BETWEEN da and a);
RETURN (incidenti);
END;
MEMBER FUNCTION nomeCliente RETURN VARCHAR
IS
BEGIN
RETURN TO_CHAR(cod_cliente);
END;
MEMBER FUNCTION tipoCliente RETURN VARCHAR
IS
BEGIN
RETURN ('u');
END;
END;
create TYPE t_cliente_pers UNDER t_cliente (
persona REF t_persona,
OVERRIDING MEMBER FUNCTION nomeCliente RETURN VARCHAR,
OVERRIDING MEMBER FUNCTION tipoCliente RETURN VARCHAR
) NOT FINAL
create or replace
TYPE BODY t_cliente_pers AS
OVERRIDING MEMBER FUNCTION nomeCliente RETURN VARCHAR
IS nc VARCHAR(90);
BEGIN
SELECT concat(DEREF(SELF.persona).dati_anagrafici.nome, concat(' ',DEREF(SELF.persona).dati_anagrafici.cognome)) INTO nc
FROM DUAL;
RETURN (nc);
END;
OVERRIDING MEMBER FUNCTION tipoCliente RETURN VARCHAR
IS
BEGIN
RETURN ('p');
END;
END;
create TYPE t_cliente_soc UNDER t_cliente (
societa t_societa,
OVERRIDING MEMBER FUNCTION nomeCliente RETURN VARCHAR,
OVERRIDING MEMBER FUNCTION tipoCliente RETURN VARCHAR
) NOT FINAL
create or replace
TYPE BODY t_cliente_soc AS
OVERRIDING MEMBER FUNCTION nomeCliente RETURN VARCHAR
IS
BEGIN
RETURN (societa.ragione_sociale.nome_soc);
END;
OVERRIDING MEMBER FUNCTION tipoCliente RETURN VARCHAR
IS
BEGIN
RETURN ('s');
END;
END;
/The declarations of functions incFattiPeriodo and incSubitiPeriodo differ between type specification and type body (the ones in the type body have formal parameters).
-
The following anonymous block works fine
begin
null;
end;
/but if I add a space between "end" and ";", like this
begin
null;
end ;
/I get ORA-06550 and "PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following ..." errors.
I'm running version 1.5.4, Build MAIN-5940, on Windows XP.racist!
No, really, the two should behave in the same manner, so if the syntax is correct (which is), both should work. As F9 doesn't, it's a bug.
Regards,
K. -
can you please tell me what am i missing. i am getting below error.
Error(8,12): PLS-00103: Encountered the symbol "C_SEL" when expecting one of the following: := . ( @ % ;
CREATE OR REPLACE PACKAGE BODY "XXDL_PN_LOAD_EMP_ASSIGN_PKG"
AS
FUNCTION insert_pn_emp_space_assign
RETURN NUMBER
IS
BEGIN
CURSOR c_sel IS --NO RECORDS FOUND
SELECT room_id ,
room_scheduler,
benches,
lab_type,
room_num,
floor_id ,
DEPARTMENT_NAME ,
room_eff_from_date ,
room_eff_to_date ,
org_id ,
pi_id ,
dept_pct ,
pi_pct ,
FUNCTIONAL_USE_PCT ,
RESEARCH_EXPLANATION ,
SUB_DEPT ,
FUNCTIONAL_USE_CODE ,
FUNCTIONAL_USE_DESCRIPTION ,
COUNT(1)
FROM XXDL.XXDL_CD_FACILITY k
WHERE pi_id NOT LIKE 'FMS%'
--and floor_id ='00'
--and pi_id='04309605'
AND room_eff_to_date IS NULL
-- and room_id ='07-590-02-2134'
AND room_id NOT IN
(SELECT location_code
FROM PN_SPACE_ASSIGN_EMP_V
WHERE emp_space_assign_id IS NOT NULL
AND EXISTS
( SELECT DISTINCT location_code
FROM pn_locations_all
WHERE room_id=location_code
--and nvl(to_date(room_eff_to_date,'Mon/dd/RRRR'),active_end_date)=active_end_date
GROUP BY room_id ,
DEPARTMENT_NAME ,
room_scheduler,
benches,
lab_type,
room_num,
floor_id ,
room_eff_from_date ,
room_eff_to_date ,
org_id ,
pi_id ,
dept_pct ,
pi_pct ,
FUNCTIONAL_USE_PCT ,
RESEARCH_EXPLANATION ,
SUB_DEPT ,
FUNCTIONAL_USE_CODE ,
FUNCTIONAL_USE_DESCRIPTION
HAVING COUNT(1)=1 ;
CURSOR c_conc( p_room_id VARCHAR2 ,p_dept_name VARCHAR2 ,p_piid VARCHAR2 ,p_eff_date VARCHAR2 )
IS
SELECT FUNCTIONAL_USE_PCT ATTRIBUTE5 ,
RESEARCH_EXPLANATION ATTRIBUTE6 ,
SUB_DEPT ATTRIBUTE7 ,
dept_pct ATTRIBUTE1 ,
pi_pct ATTRIBUTE2 ,
FUNCTIONAL_USE_CODE ATTRIBUTE3 ,
FUNCTIONAL_USE_DESCRIPTION ATTRIBUTE4
FROM XXDL.XXDL_CD_FACILITY
WHERE room_id =p_room_id
AND department_name =p_dept_name
AND pi_id =p_piid
AND 1 =2------not used
AND room_eff_to_date IS NULL
--and to_date(room_eff_to_date,'Mon/dd/RRRR')=to_date(p_eff_date,'Mon/dd/RRRR')
l_person_id NUMBER;
l_location_id NUMBER;
l_parent_loc_id NUMBER;
l_attribute5 VARCHAR2(500);
l_attribute6 VARCHAR2(500);
l_attribute7 VARCHAR2(500);
l_attribute1 VARCHAR2(500);
l_attribute2 VARCHAR2(500);
l_attribute3 VARCHAR2(500);
l_attribute4 VARCHAR2(500);
BEGIN
mo_global.set_policy_context('S',84);
FOR c2 IN c_sel
LOOP
l_parent_loc_id:= NULL;
BEGIN
SELECT location_id
INTO l_parent_loc_id -- NO RECORDS RETURNED FROM CURSOR
FROM pn_locations_all
WHERE location_alias = c2.floor_id
AND location_type_lookup_code ='FLOOR';
EXCEPTION
WHEN OTHERS THEN
l_parent_loc_id:= NULL;
END;
l_location_id:= NULL;
BEGIN
SELECT location_id
INTO l_location_id
FROM pn_locations_all
WHERE location_code = c2.room_id
AND parent_location_id =l_parent_loc_id;
EXCEPTION
WHEN OTHERS THEN
l_location_id:= NULL;
END;
l_attribute3:=NULL;
l_attribute4:=NULL;
l_attribute5:=NULL;
l_attribute6:=NULL;
l_attribute7:=NULL;
FOR c3 IN c_conc(c2.room_id,c2.department_name,c2.pi_id,c2.room_eff_to_date)
LOOP
IF l_attribute5 IS NULL THEN
l_attribute5 :=c3.attribute3||'.'||c3.attribute5;
ELSE
IF c3.attribute5 IS NOT NULL THEN
l_attribute5 :=l_attribute5||','||c3.attribute3||'.'||c3.attribute5;
END IF;
END IF;
IF l_attribute6 IS NULL THEN
IF c3.attribute6 IS NOT NULL THEN
l_attribute6 :=c3.attribute3||'.'||c3.attribute6;
END IF;
ELSE
IF c3.attribute6 IS NOT NULL THEN
l_attribute6 :=l_attribute6||','||c3.attribute3||'.'||c3.attribute6;
END IF;
END IF;
IF l_attribute7 IS NULL THEN
IF c3.attribute7 IS NOT NULL THEN
l_attribute7 :=c3.attribute3||'.'||c3.attribute7;
END IF;
ELSE
IF c3.attribute7 IS NOT NULL THEN
l_attribute7 :=l_attribute7||','||c3.attribute3||'.'||c3.attribute7;
END IF;
END IF;
--functional code
IF l_attribute3 IS NULL THEN
l_attribute3 :=c3.attribute3;
ELSE
IF c3.attribute3 IS NOT NULL THEN
l_attribute3 :=l_attribute3||','||c3.attribute3;
END IF;
END IF;
--functional desc
IF l_attribute4 IS NULL THEN
l_attribute4 :=c3.attribute4;
ELSE
IF c3.attribute4 IS NOT NULL THEN
l_attribute4 :=l_attribute4||','||c3.attribute4;
END IF;
END IF;
END LOOP;
l_person_id:=NULL;
BEGIN
SELECT person_id
INTO l_person_id
FROM per_all_people_f
WHERE employee_number=c2.pi_id
AND sysdate BETWEEN effective_start_date AND effective_end_date ;
EXCEPTION
WHEN OTHERS THEN
l_person_id:=NULL;
END;
insert into PN_EMP_SPACE_ASSIGN_ITF
BATCH_NAME
,ENTRY_TYPE
,EMP_SPACE_ASSIGN_ID
,LOCATION_ID
,EMPLOYEE_ID
,COST_CENTER_CODE
,ALLOCATED_AREA
,LAST_UPDATE_DATE
,LAST_UPDATE_LOGIN
,CREATED_BY
,CREATION_DATE
,LAST_UPDATED_BY
,ATTRIBUTE_CATEGORY
,ATTRIBUTE1
,ATTRIBUTE2
,ATTRIBUTE3
,ATTRIBUTE4
,ATTRIBUTE5
,ATTRIBUTE6
,ATTRIBUTE7
,ATTRIBUTE8
,ATTRIBUTE9
,ATTRIBUTE10
,ATTRIBUTE11
,ATTRIBUTE12
,ATTRIBUTE13
,ATTRIBUTE14
,ATTRIBUTE15
,TRANSFERRED_TO_CAD
,TRANSFERRED_TO_PN
,ERROR_MESSAGE
,SOURCE
,REQUEST_ID
,PROGRAM_APPLICATION_ID
,PROGRAM_ID
,PROGRAM_UPDATE_DATE
,EMP_ASSIGN_START_DATE
,EMP_ASSIGN_END_DATE
,UTILIZED_AREA
,CHANGE_DATE
,CHANGE_MODE
,PROJECT_ID
,TASK_ID
values--custom table columns
'07-590_floor_bulk_spc' --BATCH_NAME
,'A' --ENTRY_TYPE
,PN_SPACE_ASSIGN_EMP_S.nextval --EMP_SPACE_ASSIGN_ID
,l_location_id --LOCATION_ID
,l_person_id --EMPLOYEE_ID
,1028389 --COST_CENTER_CODE
,0 --ALLOCATED_AREA
,sysdate --LAST_UPDATE_DATE
,157092 --LAST_UPDATE_LOGIN
,157092 --CREATED_BY
,sysdate --CREATION_DATE
,157092 --LAST_UPDATED_BY
,null --ATTRIBUTE_CATEGORY
,c2.dept_pct --ATTRIBUTE1
,c2.pi_pct --ATTRIBUTE2
,C2.FUNCTIONAL_USE_CODE --ATTRIBUTE3
,C2.FUNCTIONAL_USE_DESCRIPTION --ATTRIBUTE4
,C2.FUNCTIONAL_USE_PCT --ATTRIBUTE5
,C2.RESEARCH_EXPLANATION --ATTRIBUTE6
,C2.SUB_DEPT --ATTRIBUTE7
,null --ATTRIBUTE8
,null --ATTRIBUTE9
,null --ATTRIBUTE10
,c2.ORG_Id||'-'||c2.DEPARTMENT_NAME --ATTRIBUTE11
,null --ATTRIBUTE12
,null --ATTRIBUTE13
,null --ATTRIBUTE14
,null --ATTRIBUTE15
,null --TRANSFERRED_TO_CAD
,null --TRANSFERRED_TO_PN
,null --ERROR_MESSAGE
,'TST' --SOURCE
,null --REQUEST_ID
,null --PROGRAM_APPLICATION_ID
,null --PROGRAM_ID
,null --PROGRAM_UPDATE_DATE
,to_date(c2.room_eff_from_date,'mon/dd/RRRR') --EMP_ASSIGN_START_DATE
,to_date(c2.room_eff_to_date,'mon/dd/RRRR') --EMP_ASSIGN_END_DATE
,null --UTILIZED_AREA
,null --CHANGE_DATE
,null --CHANGE_MODE
,null --PROJECT_ID
,null --TASK_ID --07-590-02-ELEV02
END LOOP;
RETURN 1;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(FND_FILE.LOG,'Error while insert_pn_emp_space_assign - '||sqlerrm);
RETURN 0;
END;
WHEN OTHERS THEN
FND_FILE.PUT_LINE(FND_FILE.LOG,'Error while insert_pn_emp_space_assign - '||sqlerrm);
RETURN 0;
END insert_pn_emp_space_assign;
END XXDL_PN_LOAD_EMP_ASSIGN_PKG;893185 wrote:
can you please tell me what am i missing. i am getting below error.
Error(8,12): PLS-00103: Encountered the symbol "C_SEL" when expecting one of the following: := . ( @ % ;
CREATE OR REPLACE PACKAGE BODY "XXDL_PN_LOAD_EMP_ASSIGN_PKG"
AS
FUNCTION insert_pn_emp_space_assign
RETURN NUMBER
IS
BEGINremove "BEGIN" from line above -
PLS-00103 Error While Creating Procedure
I am attempting to create the following procedure following the guidelines in Metalink Doc ID #118040.1 and I keep receiving the following error at Line #22:
Error(22,65): PLS-00103: Encountered the symbol ":" when expecting one of the following: := . ( % ; The symbol ":= was inserted before ":" to continue.
Here is my procedure code:
PROCEDURE sw_load_image( position IN NUMBER, filename VARCHAR2) AS
f_lob BFILE;
b_lob BLOB;
image_name VARCHAR2(30);
mime_type VARCHAR2(30);
dot_pos NUMBER;
BEGIN
-- Find the position of the dot ('.') located in the filename
dot_pos := INSTR(filename, '.');
-- Get the filename without extension and use it as image name
image_name := SUBSTR(filename,1,dot_pos-1);
-- Build the mime type. Retrieve the file extension and add it to 'image/'
mime_type := 'image/'||SUBSTR( filename, dot_pos+1, length(filename) );
INSERT INTO sw_images values(position, image_name, mime_type, empty_blob() ) RETURN img_data INTO b_lob;
f_lob := BFILENAME('IMG2LOAD', filename);
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile(b_lob, f_lob, dbms_lob.getlength(f_lob) ):
dbms_lob.fileclose(f_lob);
COMMIT;
END;
Line #22 is the line that starts 'dbms_lob.loadfromfile'. I am not seeing where I have made a mistake. Does anyone else see where I've made a mistake?
This procedure is being created on a 9i database running on W2K server and W2K client.
Thanks,
JasonThanks! As many times as I looked at that I can't believe I didn't see that. Thanks again.
-
Help on ORA-06550 & PLS-00363 Error while running a procedure from a packag
Greeting All,
I ran the following procedure from a package on a command line in sqlplus:
SQL> exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,9508);Where '2009' is the old fiscal year, '2010' is the new fiscal year and '9508' is the error code passed from the calling program. But, I received the following error messages:
ERROR at line 1:
ORA-06550: line 1, column 53:
PLS-00363: expression '9508' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any thoughts, suggestions and/or advice to resolve these errors.
Thanks in advance.Orchid wrote:
Justin,
Thanks for your response and information. Yes, Theoa was correct the 3rd parameter is an OUT variable, and it is a numeric field. The procedure was called by a form as follows:
QUALITY_ASSURANCE.COPY_SW_RESOURCES(:BLK_CONTROL.FROMFY,:BLK_CONTROL.TOFY,V_ERR);But the form does not work so I am trying to isolate the problem by running the procedure by itself in sqlplus to make sure there is no problem with the procedure.
Yesterday, I was able to run the procedure in Toad for Oracle to a successful completion by providing the 3 parameters: (2009, 2010, null). Just wonder why I cannot run the same procedure with the same parameters on a command line in sqlplus as follows:
exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,null);So, if I understand your suggestion correctly, in order to run the procedure with the 3 parameter successfully in sqlplus,
I have to declare the 3rd parameter in PL/SQL. That is to create a PL/SQL file as suggested and run the file, correct? CORRECT!
Maybe you are looking for
-
Hi, Recently I install the Oracle FMW 11.1.1.6 with Oracle Forms, Reports and Discoverer , 11g database and RCU successfully on windows7 64bit machine. I can able to access the Forms, Reports, Discoverer Plus and viewer thorugh URl successfully. But
-
Hello, For quite some time now I am unable to open Adobe acrobat reader / any other PDF file. When I open it, in windows task manager I can see there is a running process, but it stays like that. I have tried uninstalling, restarting my pc and reinst
-
Accumulated Depreciation in HFM
Hello, I am new to HFM and am finding it to difficult to understand how the transactions for Accumulated Depreciation are managed in HFM using Account and Custom Dimensions? What I find difficult to grasp is the role of SwithSignForFlow and SwithType
-
Desktop files won't open with mouse click
I'm sure this has an obvious solution, but I can't find it. (I'm on a new Powerbook G4 running Tiger) When I try to open a folder or file on my desktop by double clicking it, nothing happens. However, when I click once on the folder/icon to highlight
-
Photoshop CS6 upgrade to PS CS6 extended
I want to upgrade my photoshop cs6 to ps cs6 extended. How can I do that. I dont't want a subsciption.