Package body
I get the following error>
Error on line 10: PLS-00103: encountered the symbol "CREATE".
1. create or replace package auditpkg AS - package specification
2. procedure auditproc (p_tablename varchar2, varchar2 p_columnname,
(3 p_oldval varchar2, p_newval varchar2);
>
If I remove the stanza of package body , there is no error
This is my code:
create or replace package auditpkg AS -- package spec
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval varchar2, p_newval varchar2 );
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval number, p_newval number );
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval date, p_newval date );
end auditpkg;
create or replace package body auditpkg AS -- package body
procedure auditproc
( p_tablename varchar2, p_columnname varchar2, p_oldval varchar2, p_newval varchar2 )
IS
BEGIN
if (p_oldval is null and p_newval is not null)
or (p_oldval is not null and p_newval is null)
or (p_oldval != p_newval)
then
insert into audit_logs( tablename, columnname, username, oldval, newval, auditdate )
values (p_tablename, p_columnname, USER, p_oldval, p_newval, SYSDATE );
end if;
END auditproc;
END auditpkg;
You still building package and package body hurt
one create or replace package auditpkg
and we create or replace package body auditpkg
create or replace package auditpkg AS -- package spec
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval varchar2, p_newval varchar2 );
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval number, p_newval number );
procedure auditproc( p_tablename varchar2, p_columnname varchar2,
p_oldval date, p_newval date );
end auditpkg;
/
SHOW ERRORS
create or replace package body auditpkg AS -- package body
procedure auditproc
( p_tablename varchar2,
p_columnname varchar2,
p_oldval varchar2,
p_newval varchar2 )
IS
BEGIN
if (p_oldval is null and p_newval is not null)
or (p_oldval is not null and p_newval is null)
or (p_oldval != p_newval)
then
insert into audit_logs( tablename, columnname, username, oldval, newval, auditdate )
values (p_tablename, p_columnname, USER, p_oldval, p_newval, SYSDATE );
end if;
END auditproc;
procedure auditproc
( p_tablename varchar2,
p_columnname varchar2,
p_oldval number,
p_newval number )
IS
BEGIN
if (p_oldval is null and p_newval is not null)
or (p_oldval is not null and p_newval is null)
or (p_oldval != p_newval)
then
insert into audit_logs( tablename, columnname, username, oldval, newval, auditdate )
values (p_tablename, p_columnname, USER, p_oldval, p_newval, SYSDATE );
end if;
END auditproc;
procedure auditproc
(p_tablename varchar2,
p_columnname varchar2,
p_oldval date,
p_newval date )
IS
BEGIN
if (p_oldval is null and p_newval is not null)
or (p_oldval is not null and p_newval is null)
or (p_oldval != p_newval)
then
insert into audit_logs( tablename, columnname, username, oldval, newval, auditdate )
values (p_tablename, p_columnname, USER, p_oldval, p_newval, SYSDATE );
end if;
END auditproc;
END auditpkg;
/
Tags: Database
Similar Questions
-
PACKAGE BODY APPS. AD_ZD_ADOP contains errors
APP TIER - Linux - SLES 11 - SP2 - x86_64
DB LEVEL - Linux for system Z - SLES 11 - SP2 - s390
I encounter errors in the body to Package APPS. AD_ZD_ADOP, that has brought all the patches to a status quo on our schedule instance.
The sequence of events have been
The following hotfixes have been applied.
- Patch 19462638
- Patch 19197270
- Patch 21132723
- 19330775
- 20677045
- 19259764
Doc 1617461.1 was followed - B path of
After Patch 19259764 has been applied, all steps until step 8 of Doc 1617461.1 have been completed.
Failure of the fs_clone step (step 9). My colleague opened a SR - advice was far from expected.
Yesterday, I took this with success and more cloned the fix for the file system to perform file system (1383621.1) - however, I'm still not able to run fs_clone with success.
Even a basic ADADMIN session fails.
Here are the errors while trying to compile APPS package bodies. AD_ZD_ADOP
SQL > alter package APPS. AD_ZD_ADOP compile body;WARNING: The bodies of Package modified with compilation errors.
SQL > show errors;
Errors for BODY of PACKAGE applications. AD_ZD_ADOP:LINE/COL ERROR
-------- -----------------------------------------------------------------
2503/3 PL/SQL: statement ignored
2503/7 PLS-00201: identifier ' SYS. DBMS_METADATA_UTIL' must be declared
SQL >Also while trying to launch ADADMIN, I get errors themselves.
Error of Administration AD:
ORA-04063: package body "APPS. AD_ZD_ADOP"contains errors
Could not insert the record of the action in the table of patches
Error of Administration AD:
Error when you try to insert adadmin task CMP_INVALID action
Update running adadmin of failure actions
Error of Administration AD:
The following ORACLE error:
ORA-01756: city not properly finished chain
occurred while executing the SQL statement:
UPDATE ad_adop_session_patches set status = 'F' where status = 'R' and
as numero_de_bogue ' ADADMIN
Error of Administration AD:
Table ad_adop_session_patches update errors
You must check the file
/U02/fs_ne/EBSapps/log/ADadmin/log/ADadmin.log
to find errors.
Can someone please. I have also a SR - but nice try various channels to find a solution.
Hello
The necessary subsidies on the SYS package may be missing. DBMS_METADATA_UTIL.
Try this command (as sysdba) and compile the package:
Grant execute on SYS. DBMS_METADATA_UTIL applications;
Kind regards
Bashar
-
Hi friends,
Could you help me understand this behavior in oracle.
SQL > create or replace package mypkg is
2 number of v_statevar: = 40;
3 procedure MyProc;
4 end mypkg;
5.
Package created.
SQL > create or replace package body is mypkg
2 procedure MyProc is
3 myval number;
4 start
5. Select x
6 in myval
7 of dependonme;
8
9 - myval: = myval * mypkg.v_statevar;
10 DBMS_OUTPUT. Put_line (' my result is: ' | myVal);
11 end;
12 end mypkg;
13.
Package body created.
SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
PACKAGE VALID MYPKG
VALID PACKAGE BODY MYPKG
SQL > set serveroutput on
SQL > exec mypkg.myproc;
My result is: 5
PL/SQL procedure successfully completed.
SQL > create or replace package mypkg is
2 number of v_statevar: = 150;
3 procedure MyProc;
4 end mypkg;
5.
Package created.
SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
PACKAGE VALID MYPKG
INVALID BODY PACKAGE MYPKG
SQL > set serveroutput on
SQL > exec mypkg.myproc;
My result is: 5
PL/SQL procedure successfully completed.
SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
PACKAGE VALID MYPKG
VALID PACKAGE BODY MYPKG
SQL >
How did change the value of the variable in the package specification makes the invalid package body.
How execution of the procedure of the package is once again the VALID State.
Kimmy says:
Hello carine,.
I'm just setting the variable in the notebook, that variable was not referred to the procedure in the package body, also I'm not change any signature/details of the procedure described in the package specification, then what do the package body are invalid.
There are two parts to this.
(a) by recompiling package specifications, you then automatically invalidates all objects in the database that dependent on it. In this case, the package body is dependent on, so get marked as invalid. When you try and run something in the package Oracle try to compile the package, if it succeeds, it will mark it as valid again (as in your case).
(b) the variables and declarations of a package (public and private) are what constitutes the 'State '. By calling the package, you instantiate a copy in memory to create this state of package for this instantiation of the entire session. By recompiling package specifications (it's not fair that you change the value of the variable, you recompile the spec), you can invalidate the State in memory and therefore potentially invalidate the package body. It depends on your version of the database. In 10g, by invalidating state you will get an exception "State package rejected" when you try to run the package after the change, and then it will automatically compile and validate the package, so that it eventually works ok. From 11 g, there is more fine grain dependencies on the State, so if the change you have made has no effect on what you run, it can validate and run without causing the exception 'package State scrapped ';. He would only do that if it's something that you used.
-
package body "APPS. AD_ZD_ADOP' mistakes adoption apply fail
Hello to any help/solution for this error:
EBS version 12.2
Intend to upgrade to 12.2.4 then only may apply Doc-Id 1617461.1 :
"adoption phase = apply patches = 19330775, 20677045 = /hotpatch merge Yes = yes".
Validation of the system configuration...
[ERROR] Could not execute the SQL statement:
Select AD_ZD_ADOP. The double GET_INVALID_NODES()
[ERROR] Error message:
[ERROR] Could not execute the SQL statement:
Select AD_ZD_ADOP. The double GET_INVALID_NODES()
[ERROR] Error message:
[UNEXPECTED] '-1' nodes are listed in the table ADOP_VALID_NODES, but not in the FND_NODES table.
[UNEXPECTED] To fix this problem, run AutoConfig on the nodes '-1 '.
[UNEXPECTED] Error checking if it is an instance of multi node
SQL > ALTER PACKAGE APPS. BODY OF AD_ZD_ADOP OF COMPILATION;
WARNING: The bodies of Package modified with compilation errors.
SQL > SHOW ERRORS, PACKAGE BODY APPS. AD_ZD_ADOP
Errors for BODY of PACKAGE applications. AD_ZD_ADOP:
LINE/COL ERROR
-------- -----------------------------------------------------------------
505/13 PL/SQL: statement ignored
507/86 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
511/13 PL/SQL: statement ignored
513/86 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
521/12 PL/SQL: statement ignored
524/18 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
533/9 PL/SQL: statement ignored
535/121 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
575/9 PL/SQL: statement ignored
577/123 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
1580/7 PL/SQL: statement ignored
LINE/COL ERROR
-------- -----------------------------------------------------------------
1582/65 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier
SQL >
Thank you!
Luis
Hello
The solution is:
1. check that your ad_adop_session_patches.xdf file is version 120.6.12020000.4
grep Header $AD_TOP/patch/115/xdf/ad_adop_session_patches.xdf
2. If the version is correct, then run this command (from Bug 18544083 : ADOPTION: ORA-04063: "APPS.) (AD_ZD_ADOP"CONTAINS ERRORS / ORA-00904:"SESSION_TYPE"):
adjava-mx512m - nojit oracle.apps.fnd.odf2.FndXdfCmp applsys APPS apps APPS thin
: : table $AD_TOP/patch/115/xdf/ad_adop_session_patches.xdf $FND_TOP/patch/115/xdf/xsl changedb = y Please put in the host current (complete), port, and SID
NOTE: If you want to test the command first, please change "changedb = y" to "changedb = n".
3. Please retry compilation AD_ZD_ADOP (or try running ADZDADOPB.pls).
4. If the compilation of work, retry the patch.
Kind regards
Luis
-
Hello
do 12.2 upgrade to 12.2.4 (doc: 1617458.1) did all the patch (doc: 1594274.1()
1617461.1 section 3.2 step 5 (patch 18283295, 20034256,20075842) applied correctly
apply also 4.1 critical fixes to AD (patch 20125137( )
and in section 3.2 step 6 generate this error:
AutoPatch error:
Error: Cannot run enable_custom_user
AutoPatch - aiuoraEnableCustom: INFO: ORA-04063: package body "APPS. AD_ZD_PREP"contains errors
ORA-06508: PL/SQL: called program unit is not found: 'APPS. AD_ZD_PREP ".
ORA-06512: at line 1
##
SQL > select object_name, object_type of object where status = 'INVALID ';
OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
MATERIALIZED VIEW OE_ITEMS_MV
MATERIALIZED VIEW OZF_EARNING_SUMMARY_MV
##
###
SQL > SELECT abbreviation, codelevel FROM AD_TRACKABLE_ENTITIES WHERE abbreviation in ('T2K', 'ad');
ABBREVIA CODELEVEL
-------- ---------
C.5 announcement
T2K C
###
####
file: 1617461_1_adop step6.txt
contain the adoption order run from doc: 1617461.1 section 3.2 step 6
file: 19045166_diagnostic_info_serveurv12.serveurvm.zip
contain the diagnosis of the 19045166
file: 17537119_check.txt
contain the diagnosis of the 17537119
####
Please confirm that all the patches of RDBMS postinstall.sql scripts have been executed according to the instructions in the Readme of each patch.
Thank you
Hussein
-
Procedure is not recognized in the package body
I have this error message:
Compile for HR.MILOS_PACKAGE BODY of PACKAGE errors
Error: PLS-00323: subprogram or cursor "RAISE_SALARY" is declared in a package specification and must be defined in the package body
Online: 19
Text: IF (l_exists)
I deffined in the whole of the body after the first procedure that is no problem.
I don't know what the problem is. There is no other sugestions compiler.
Procedure works very well when packing.
PROCEDURE RAISE_SALARY (p_perc p_dep_id NUMBER, NUMBER) IS
v_emp_id employees.employee_id%TYPE;
v_sal employees.salary%TYPE;
v_avg_sal employees.salary%TYPE;
CURSOR c_salaries IS SELECT employee_id, salary employees
If NOT EXISTS (SELECT 1 from employees e WHERE e.manager_id = employees.employee_id)
and department_id = p_dep_id;
CURSOR c_salaries_m IS SELECT employee_id, salary employees
WHERE employe_id IN (SELECT distinct manager_id of employees)
and department_id = p_dep_id;
Start
SELECT AVG (salary) IN the v_avg_sal FROM Employees WHERE department_id = p_dep_id;
OPEN c_salaries.
LOOP
EXTRACT c_salaries INTO v_emp_id, v_sal;
EXIT WHEN c_salaries % NOTFOUND;
IF v_sal + 1 > 3 * v_avg_sal
THEN UPDATE employees SET salary = 3 * v_avg_sal
WHERE employe_id = v_emp_id;
UPDATE of OTHER employees SET salary = salary * to_number ('1' |'.) ' || p_perc)
WHERE employe_id = v_emp_id;
END IF;
END LOOP;
CLOSE C_salaries;
OPEN c_salaries_m.
LOOP
EXTRACT c_salaries_m INTO v_emp_id, v_sal;
EXIT WHEN c_salaries_m % NOTFOUND;
IF v_sal + 5 > 3 * v_avg_sal
THEN UPDATE employees SET salary = 3 * v_avg_sal
WHERE employe_id = v_emp_id;
UPDATE of OTHER employees SET salary = salary * to_number ('1' |'.) ' || (p_perc + 50))
WHERE employe_id = v_emp_id;
END IF;
END LOOP;
CLOSE C_salaries_m;
end RAISE_SALARY;
Compile for HR.MILOS_PACKAGE BODY of PACKAGE errors
Error: PLS-00323: subprogram or cursor "RAISE_SALARY" is declared in a package specification and must be defined in the package body
We hear... you have defined the raise_salary procedure in the package specification but not in the package body. (pretty clear)
not in the package body means:
the statement could be different...
PROCEDURE RAISE_SALARY (NUMBER, p_dep_id NUMBER p_perc)
so:
are identical named parameters?
they have identical data types?
vary according to the assigned default values?
vary according to its use (IN/OUT/IN OUT) - (why did not specify the use anyway?)
HTH
-
When I change the package body, down to show me ' calculation of breadcrumbs to... body "in infinitive loop until I get out.
On
—–Oracle SQL Developer 4.0.2.15
Version 4.0.2.15
Build 15.21The IDE version: 12.1.3.2.41.140418.1111
Product ID: oracle.sqldeveloper
Product version: 12.2.0.15.21Version
——-Version of the component
========= =======
Oracle IDE 4.0.2.15.21
Java (TM) Platform 1.7.0_65
Support versioning 4.0.2.15.21Thanks for the update. I pass the developer and I hope he finds that they are useful.
A preliminary analysis shows some problems of Java:
1. report of the discharge of the thread Analyzer is a little misleading because of https://bugs.openjdk.java.net/browse/JDK-8036823
2 possible endless loop in the ScaledBlit routine on the thread main event: https://bugs.openjdk.java.net/browse/JDK-8028539
Question 2 currently has no resolution, but there are a few (a potential solution?) fix for jdk1.8.0_40 (8u40). The latest official version is 8u11.
Assuming that the number 2 is the culprit on Ubuntu, just like on Windows, then 1st edition probably does not concern us. Just for reference, a backport of the Java correction for the 1st edition exists on jdk 1.7 and 1.8, but has yet to be officially released on either.
Kind regards
Gary -
Package body dropped, but showing invalid
Nice day:
Oracle 11 g 2
I created a Package with Package bodies, procedures 3, which works very well. I can call it without error. However, if I run this query:
SELECT *.
From user_objects
Situation WHERE = "INVALID."
I get the following result:
OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME TASK_PROCEDURES 28700 PACKAGE BODY 5 July 14 July 11, 14 2014-07 - 11:18:42:39 Not valid N N N 2 It is an old package body, that I dropped it about 4 days ago. That is always supposed to show if I run this query?
I work with Oracle SQL Developer, using almost the same version too. I don't think that it has nothing to do with the tool as the data dictionary shows this info too.
Could you post the exact commands that you run from a sql more session? And the sql like too much output.
Example (demo of pseudo code)
SQL > alter the package xxx body compilation;
SQL > compiled package.
SQL > show errors
SQL > no error
SQL > drop package xxx;
SQL > package abandoned;
SQL > drop package body xxx.
???
SQL > select xxx.someFunction from double;
I could explain the behavior if you have enabled the editions (CDE). But there is no air if in your case.
Just to be absolutely sure of it. Make the select statement and after the release:
select object_name, object_type, namespace, edition_name from user_objects_ae where object_name = 'YOURPACKAGENAME';
-
ORA-04063: package body "APPS. HZ_PARTY_STAGE"contains errors
Hello
Received the error when compile. Checked in the Note: 427418.1 did not work. Help, please. It's 12.1.3, 11.2.0.3 Linux database.
SQL > alter package APPS. HZ_PARTY_STAGE compile body;
WARNING: The bodies of Package modified with compilation errors.
SQL > show err
Errors for BODY of PACKAGE applications. HZ_PARTY_STAGE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
85/5 PL/SQL: statement ignored
85/5 PLS-00201: identifier ' AD_CTX_DDL. DROP_PREFERENCE' must be
has said
95/5 PL/SQL: statement ignored
95/5 PLS-00201: identifier ' AD_CTX_DDL. CREATE_PREFERENCE' must be
has said
96/5 PL/SQL: statement ignored
96/5 PLS-00201: identifier ' AD_CTX_DDL. SET_ATTRIBUTE' must be declared
3313/28 PL/SQL: statement ignored
LINE/COL ERROR
-------- -----------------------------------------------------------------
3313/28 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
3322/27 PL/SQL: statement ignored
3322/27-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
3352/24 PL/SQL: statement ignored
3352/24 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
3362/23 PL/SQL: statement ignored
3362/23 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
3399/26 PL/SQL: statement ignored
3399/26-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
3409/26 PL/SQL: statement ignored
3409/26-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
LINE/COL ERROR
-------- -----------------------------------------------------------------
3447/27 PL/SQL: statement ignored
3447/27-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared
SQL > grant execute on AD_CTX_DDL. DROP_PREFERENCE applications;
Grant execute on AD_CTX_DDL. Applications DROP_PREFERENCE
*
ERROR on line 1:
ORA-04042: procedure, function, package, or package body does not exist
The solution in the doc, you mentioned in your first post. Run the dctxpkg.sql script and pass the correct settings and make sure that it runs successfully.
Thank you
Hussein
-
Hello people.
Oracle Database 10 g Express Edition Release 10.2.0.1.0 - product
PL/SQL Release 10.2.0.1.0 - Production
Hope you are all well. I am creating a package as a procedure body, but I get the following error:
- Error (37.7): PL/SQL: statement ignored
- Error (38,15): PLS-00201: identifier ' C1. Email_address' must be declared
I'm fairly inexperienced, so the resolution may be simple, but I'm still confused as to what to do. Here is my code:
create or replace PACKAGE BODY "CHECK_VISA_DATE" AS PROCEDURE "VISA_EXPIRY" IS l_msg_body varchar2(32000) := null; l_count number := 0; BEGIN FOR c1 IN (SELECT E.EMPLOYEE_ID, E.CLOCK_NUMBER, E.LAST_NAME, E.FIRST_NAME, E.EMAIL_ADDRESS, E.VISA_EXPIRY FROM EMPLOYEE E, EMPLOYEE_CONTRACT EC WHERE E.EMPLOYEE_ID = EC.EMPLOYEE_ID AND EC.ACTUAL_END IS NULL AND EC.FUTURE_CONTRACT = 1 AND EC.SUB_TASK = 1 AND E.VISA_EXPIRY < SYSDATE + 60) LOOP IF l_count = 0 THEN L_MSG_BODY := 'As of today, your visa is due to expire in 60 days '||chr(10)|| CHR(10)|| ' Visa Expiration: '|| c1.VISA_EXPIRY; END IF; l_count := l_count + 1; END LOOP; IF L_MSG_BODY IS NOT NULL THEN HTMLDB_MAIL.SEND( P_TO => c1.EMAIL_ADDRESS, P_BODY => L_MSG_BODY, P_SUBJ => 'Visa Expiration '|| c1.VISA_EXPIRY); END IF; END "VISA_EXPIRY"; END "CHECK_VISA_DATE";
Hello
AquaNX4 wrote:
...
Output is an email, so there really isn't any type of insert statements, or additional information to give...
If there is no relevant information in AMPEMP or EMP_CONTRACT tables, then you don't need to question the in your procedure.
Error (24,112): PLS-00302: component 'VISA_EXPIRY' must be declared
There is no column called
VISA_EXPIRis the cursor. Did you mean to say
E VISA_EXPIR?
-
Can only establish us a specific procedure in the package body?
Hi experts
Say we have a package as follows:
package my_package
a procedure;
procedure b;
procedure c;
end packege my_package;
my_package package body
procedure a
is
....
end;
procedure b
is
....
end b;
procedure c
is
....
c end;
end of packet my_package;
I want to only change the procedure has, should I compile the body together for this? Can I do to compile the procedure like the following?
create or replace the my_package.procedure one
is
....
end my_package.a;
Thank you
Hello
No, you must recompile the entire body. There is no way to compile a procedure in the package.
-
Hi all
Please help me understand why I receive PLS-00323 error when my function exists in the header and body of the package.
Please find below the source code.
Maybe I should post more details here, please tell me what else should I show to get help.
I tried to compile my drawing
EXEC DBMS_UTILITY.compile_schema (pattern = > 'ZVIT');
but still
Select * from user_errors
Returns
NAME TYPE SEQUENCE LINE (LINE)
------------------------------ ------------ ---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
PACKAGE 2 8 12 PKG_PK8842_ACCNOTMOVE BODY
PLS-00323: subprogram or cursor "ACCNOTMOVEFIZ" is declared in a specific package
cation and must be defined in the package body
ERROR 323
PACKAGE 1 3 12 PKG_PK8842_ACCNOTMOVE BODY
PLS-00323: subprogram or cursor "ACCNOTMOVEJUR" is declared in a specific package
cation and must be defined in the package body
ERROR 323
2 selected lines.
source code:
CREATE OR REPLACE PACKAGE ZVIT. PKG_PK8842_AccNotMove
AS
FUNCTION AccNotMoveJUR)
p_contragentId dwh_CR_contragent.ID%TYPE,
p_date Date)
RETURN number;
FUNCTION AccNotMoveFIZ)
p_contragentId dwh_CR_contragent.ID%TYPE,
p_date Date)
RETURN number;
FUNCTION DtLastMove)
p_Id B2_OLAP. DIMAACCOUNT_ALL.ID%TYPE)
Date of RETURN;
END;
/
CREATE OR REPLACE PACKAGE BODY ZVIT. PKG_PK8842_AccNotMove
AS
FUNCTION AccNotMoveJUR)
p_contragentId zvit.dwh_CR_contragent.ID%TYPE,
p_date Date)
RETURN number
IS
l_Result Number (1);
l_contragentId zvit.dwh_CR_contragent.ID%TYPE;
l_dateopen Date;
Date of l_dtMove1;
Date of l_dtMove2;
BEGIN
l_Result: = 0;
BEGIN
Select Distinct a.contragentid
In l_contragentId
OF B2_OLAP. DIMAACCOUNT_ALL one
where a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and a.ACCOUNTSTATEID not in (1,2);
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_contragentId: = NULL;
END;
IF l_contragentId IS NOT NULL THEN
l_Result: = 0;
ON THE OTHER
BEGIN
Select MAX (a.dateopen)
In l_DateOpen
OF B2_OLAP. DIMAACCOUNT_ALL one
where a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and a.ACCOUNTSTATEID <>2
and a.DateOpen > p_date;
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DateOpen: = NULL;
END;
IF l_DateOpen IS NOT NULL THEN
l_Result: = 0;
ON THE OTHER
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and d.ACCOUNTBID = a.Id
and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and not in Substr (d.accountano, 1, 4) ('2608 ', ' 2658');
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and d.ACCOUNTBID = a.Id
and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and not in Substr (d.accountano, 1, 4) ('2608 ', ' 2658');
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and d.ACCOUNTAID = a.Id
and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2600,2650)
and d.arcdate > = p_date
and d.ACCOUNTAID = a.Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
l_Result: = 1;
On the other
l_Result: = 0;
End If;
END IF;
END IF;
RETURN l_Result;
END AccNotMoveJUR;
--------------------------------------------------------------------------------
FUNCTION AccNotMoveFIZ)
p_contragentId zvit.dwh_CR_contragent.ID%TYPE,
p_date Date)
RETURN number
IS
l_Result Number (1);
l_contragentId zvit.dwh_CR_contragent.ID%TYPE;
l_dateopen Date;
Date of l_dtMove1;
BEGIN
l_Result: = 0;
BEGIN
Select Distinct a.contragentid
In l_contragentId
OF B2_OLAP. DIMAACCOUNT_ALL one
where a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and a.ACCOUNTSTATEID not in (1,2);
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_contragentId: = NULL;
END;
IF l_contragentId IS NOT NULL THEN
l_Result: = 0;
ON THE OTHER
BEGIN
Select MAX (a.dateopen)
In l_DateOpen
OF B2_OLAP. DIMAACCOUNT_ALL one
where a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and a.ACCOUNTSTATEID <>2
and a.DateOpen > p_date;
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DateOpen: = NULL;
END;
IF l_DateOpen IS NOT NULL THEN
l_Result: = 0;
ON THE OTHER
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and d.ACCOUNTBID = a.Id
and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and Substr(d.accountano,1,4) <>'2628';
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and d.arcdate > = p_date
and d.ACCOUNTBID = a.Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and Substr(d.accountano,1,4) <>'2628';
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and d.ACCOUNTAID = a.Id
and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
BEGIN
SELECT MAX (d.arcdate)
In l_dtMove1
OF B2_OLAP. DIMAACCOUNT_ALL has,
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE a.contragentid = p_contragentId
and a.BACCOUNTID in (2620,2625)
and d.arcdate > = p_date
and d.ACCOUNTAID = a.Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_dtMove1: = NULL;
END;
END IF;
IF l_dtMove1 IS NULL THEN
l_Result: = 1;
On the other
l_Result: = 0;
End If;
END IF;
END IF;
RETURN l_Result;
END AccNotMoveFIZ;
--------------------------------------------------------------------------------
FUNCTION DtLastMove)
p_Id B2_OLAP. DIMAACCOUNT_ALL.ID%TYPE)
Date of RETURN
IS
l_Result Date;
Date of l_DtLast1;
Date of l_DtLast2;
Date of l_DtLast3;
Date of l_DtLast4;
BEGIN
l_Result: = NULL;
BEGIN
SELECT MAX (d.arcdate)
In l_DtLast1
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE d.ACCOUNTBID = p_Id
- and d.arcdate > = p_date
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and Substr (d.accountano, 1, 4) not in ('2608', ' 2658 ', ' 2628');
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DtLast1: = NULL;
END;
BEGIN
SELECT MAX (d.arcdate)
In l_DtLast2
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE d.ACCOUNTBID = p_Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3)
and Substr (d.accountano, 1, 4) not in ('2608', ' 2658 ', ' 2628');
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DtLast2: = NULL;
END;
BEGIN
SELECT MAX (d.arcdate)
In l_DtLast3
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE d.ACCOUNTAID = p_Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DtLast3: = NULL;
END;
BEGIN
SELECT MAX (d.arcdate)
In l_DtLast4
B2_OLAP.AR_DOCUMENT d,
B2_OLAP. DIMDOCUMENTTYPE dt
WHERE d.ACCOUNTAID = p_Id
and d.DOCUMENTTYPEID = dt.id
and dt. OPERATIONTYPEBYSUMMAID not to (2,3);
- and d.DOCUMENTSTATEID = 2
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_DtLast4: = NULL;
END;
l_DtLast1:=NVL(l_DtLast1,to_date('01.01.1900','dd.mm.yyyy'));
l_DtLast2:=NVL(l_DtLast2,to_date('01.01.1900','dd.mm.yyyy'));
l_DtLast3:=NVL(l_DtLast3,to_date('01.01.1900','dd.mm.yyyy'));
l_DtLast4:=NVL(l_DtLast4,to_date('01.01.1900','dd.mm.yyyy'));
l_Result: = Greatest (l_DtLast1, l_DtLast2, l_DtLast3, l_DtLast4);
IF l_Result = TO_DATE('01.01.1900','dd.mm.yyyy') THEN
l_Result: = NULL;
END IF;
RETURN l_Result;
END DtLastMove;
---////////////////////////////////////////////////////
END;
/
You declare your parameter with a different type between the specification and body, your statements must match.
-
ORA-04063: package body 'WMSYS. LTADM"has errors
Hello world
Could you help me with this:
-After upgrading oracle 10.2.0.4 10.2.0.1, expdp export displays the following error:
Treatment of type of object DATABASE_EXPORT, DIAGRAM, POST_SCHEMA, PROCOBJ
ORA-39127: unexpected error of the call to export_string: = WMSYS.LT_EXPORT_PKG.schema_info_exp ('SYS', 1,1, '10.01.00.02.00', newblock)
ORA-04063: package body 'WMSYS. LTADM"has errors
ORA-06508: PL/SQL: called program unit is not found: 'WMSYS. LTADM.
ORA-06512: at "WMSYS.LT_EXPORT_PKG", line 906
ORA-06512: at line 1
ORA-06512: at "SYS." Dbms_metadata", line 5419
...
Work 'SYSTEM '. "" SYS_EXPORT_FULL_09 "completed with error (s 1) at 20:12:07
-After execution of utlrp.sql:
SQL > select text of dba_errors, whose name = "LTADM."
TEXT
--------------------------------------------------------------------------------
PL/SQL: ORA-00980: synonym translation is no longer valid
PL/SQL: SQL statement ignored
Thank you
Hello
Try checking all of the synonyms mentioned in this list:
Select * from dba_dependencies where name = 'LTADM' and REFERENCED_TYPE = 'SYNONYM '.
See you soon,.
Rich
-
SELECT statement in a Package body
I have the following in my package body and it gives me an error:
- Error (7.1): PLS-00428: an INTO clause in this SELECT statement
PROCEDURE MyQuery
AS
BEGIN
Select * from customer;
END MyQuery;
The error message is correct.
Your selection must have an INTO clause and must return 1 and only 1 row.
-
4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode
4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode
He was connected/buggy. It is not fixed yet. But it will be.
-
EA1 - double-click the package/package body member stopped working?
Developer SQL version 4.0.0.12, Windows XP
Connections-> packages-> members in expansion of the package / package body-> double-click Member of package does nothing (in an earlier version of SQL Dev he opened the package / package of the body in the editor and repositioned to double function / procedure)
Buggy as 17157410.
Workaround solution:
1. open the pl/sql module in the editor.
2. menu Ctx-> brief overview...
3 panel attachable with the same structure of members (+ filter) is displayed.
4. it down action works (simple click).
Maybe you are looking for
-
Communication to S7 300 PLC using the A2 CP5611 map
I need to collect data from PLC S7 300. I am havin the PC with card Siemens CP 5611 A2 Profibus. I don't want to use any OPC on this. is there any avilable pilot or a colecting data library. Concerning Sivakumar [email protected]
-
My keyboard is typing the letters instead of numbers?
My laptop keyboard is typing the letters instead of numbers. Before that happened, I was cleaning the keyboard with a toothpick, and when I clicked on Google Chrome, I typed in face and then I tried typing in the book, but then he is out,: faceb662 a
-
Problem with Netbook HP Mini 1000
Hello. I had my HP Mini 1000 for almost 2 years and all of a sudden, I have this problem. It lights up. However, all right. The charger works fine and the battery is new, whereas I have change every 6 months. It's just the netbook that won't turn on.
-
not exactly horizontal and vertical accelerometer, I have this problem in my z10 phone... when I play the game using the accelerometer I have to tilt my camera a bit to the left to reach the horizontal real... is my sensor broken? can I calibrate it?