PLS-00225: subprogram or cursor reference off scoper - error
I have a call to an another procedureB proceedings. This procedure within a package of packageB.I have an IF condition (inside A procedure) to search for a value of variable 'v_errmsg' inside ProcedureB. The v_errmsg is declared inside the ProcedureB as below.v_errmsg VARcHAR2(1000) := c_procname
where c_procname is declared in the body of PackageB asc_procname CONSTANT VARCHAR2(32) := 'pr_InitializeGlobalVariables';
My code looks like thisIF packageB.ProcedureB.v_errmsg is null then
...do something
else
... do something else
end if;
This gives an error PLS-00225: subprogram or cursor reference ProcedureB is out of reach.Any suggestions on how the call to the variable should be appreciated?
Published by: steve2312 on January 13, 2012 09:01
Hello
steve2312 wrote:
I have a call to an another procedureB proceedings. This procedure within a package of packageB.I have an IF condition (inside A procedure) to search for a value of variable 'v_errmsg' inside ProcedureB. The v_errmsg is declared inside the ProcedureB as below.v_errmsg VARcHAR2(1000) := c_procname
... My code looks like this
IF packageB.ProcedureB.v_errmsg is null then ...do something else ... do something else end if;
If v_errmsg is either inside the ProcedureB, it can be referenced only within ProcedureB. If you need to refer to the variable outside of the procedure, then
- Declare it in the packageB specification (not in ProcedureB), or
- make an OUT argument, or
- change the procedure to a function if the function may return to v_errmsg, or
- Save it in a variable SYS_CONTEXT or a global temporary table.
If v_errmsg is declared in the packageB specification, so you can reference it like this:
IF packageB.v_errmsg IS NULL THEN
I hope that answers your question.
If this is not the case, after a Complete test script that people can work to recreate the problem and test their ideas. Include complete reports for CREATING a PACKAGE and CREATE PACKAGE BODY and little code to call the procedure, or refer to the variable, or whatever it is you want to do.
Also post the result desired from this code. Offers call dbms_output.put_line (or something) to show results.
Always tell what version of Oracle you are using.
Published by: Frank Kulash, January 13, 2012 12:19
Tags: Database
Similar Questions
-
subprogram or cursor reference 'CUR_FEATURE' is out of range
Hi gurus,
Your help is greatly needed. I am trying to compile this function and get the below error.
Trying to set the code, could you please season here.
PL/SQL: Statement ignored
PLS-00225: subprogram or cursor reference 'CUR_FEATURE' is out of range
FUNCTION GET_TERMINAL_FEATURE_TYPE RETURN PROD. FEATURE_CUSTOM_LIST_TAB
ISvTerminal_Id PROD. TERMINAL SERVER. TYPE % TERMINAL_ID;
vCFTSELECT PROD. CUSTOM_FEATURE_TYPE. TYPE % FEATURE_TYPE_SELECT;
nPRECEDENCE PROD. CUSTOM_FEATURE_TYPE. PRIORITY % TYPE;
nWIRE_COMM_SEQ_ID PROD. WIRELESS_COMM_INFO. TYPE % WIRELESS_COMM_SEQ_ID;
vDESC PROD. WIRELESS_COMM_INFO. DESCRIPTION % TYPE;
nFEATURE_TYPE_ID PROD. FEATURE_TYPE. TYPE % FEATURE_TYPE_ID;TYPE CFT_SEL_REF_CUR IS REF CURSOR;
CFT_SEL_CUR CFT_SEL_REF_CUR;CUSTOM_FEATURE_TYPE_LIST PROD. FEATURE_CUSTOM_LIST_TAB: = PROD. FEATURE_CUSTOM_LIST_TAB();
CURSOR CUR_FEATURE (cvTERMINAL_ID PROD. TERMINAL SERVER. TERMINAL_ID % TYPE) IS
SELECT THE TSF. TERMINAL_FEATURE_ID, TF. FEATURE_TYPE_ID, FEATURE_SEQUENCE_ID ROWNUM
PROD. TERMINAL_FEATURE TF, PROD. TSF TERMINAL_SPEC_FEATURE
WHERE TF. TERMINAL_FEATURE_ID = TSF. TERMINAL_FEATURE_ID
AND TSF. TERMINAL_ID = cvTERMINAL_ID
ORDER BY TSF. TERMINAL_FEATURE_ID;CURSOR CUR_FEATURE_TYPE (cvFETAURE_TYPE_ID PROD. FEATURE_TYPE. FEATURE_TYPE_ID % TYPE) IS
SELECT FEATURE_TYPE_ID, FEATURE_SEQUENCE_ID, DISPLAY_VALUE, DATA_VALUE
OF FEATURE_TYPE
WHERE FEATURE_TYPE_ID = cvFETAURE_TYPE_ID
ORDER BY FEATURE_SEQUENCE_ID;
BEGIN
DBMS_OUTPUT. Put_line ("inside the function GET_TERMINAL_FEATURE_TYPE");
vTerminal_id: = PROD. TMS_GLOBAL_VARIABLES.gv_ref_Terminal_id;IF CUR_FEATURE. FEATURE_TYPE_ID > = 1000 THEN
-Make feature_type_id and feature_id for Terminal
FOR CUR_FEATURE_REC IN CUR_FEATURE (vTerminal_id)
LOOP
-Get the select query based on feature_type_id
SELECT FEATURE_TYPE_SELECT FROM vCFTSELECT
PROD. CUSTOM_FEATURE_TYPE
WHERE FEATURE_TYPE_ID = CUR_FEATURE_REC. FEATURE_TYPE_ID;
CFT_SEL_CUR OPEN for vCFTSELECT USING vTerminal_id;
LOOP
Search FOR CFT_SEL_CUR IN nWIRE_COMM_SEQ_ID, vDESC;
WHEN THE OUTPUT CFT_SEL_CUR % NOTFOUND;
CUSTOM_FEATURE_TYPE_LIST. EXTEND;
CUSTOM_FEATURE_TYPE_LIST (CUSTOM_FEATURE_TYPE_LIST. COUNTY)
: = FEATURE_CUSTOM_LIST_OBJ (vTerminal_id,
CUR_FEATURE_REC. TERMINAL_FEATURE_ID,
CUR_FEATURE_REC. FEATURE_SEQUENCE_ID,
vDESC,
nWIRE_COMM_SEQ_ID
);
END LOOP;
CLOSE CFT_SEL_CUR;
END LOOP;ON THE OTHER
FOR CUR_FEATURE_TYPE_REC IN CUR_FEATURE_TYPE (cvFETAURE_TYPE_ID)
LOOP
CUSTOM_FEATURE_TYPE_LIST. EXTEND;
CUSTOM_FEATURE_TYPE_LIST (CUSTOM_FEATURE_TYPE_LIST. COUNTY)
: = FEATURE_CUSTOM_LIST_OBJ (vTerminal_id,
CUR_FEATURE_TYPE_REC. FEATURE_TYPE_ID,
CUR_FEATURE_TYPE_REC. FEATURE_SEQUENCE_ID,
CUR_FEATURE_TYPE_REC. DISPLAY_VALUE,
CUR_FEATURE_TYPE_REC. DATA_VALUE
);
END LOOP;
END IF;
RETURN CUSTOM_FEATURE_TYPE_LIST;EXCEPTION WHEN OTHERS THEN
Lift;
END GET_TERMINAL_FEATURE_TYPE;Hello
The problem may be with this line
IF CUR_FEATURE. FEATURE_TYPE_ID > = 1000 THEN
You cannot reference columns of a cursor; you reference the columns of an instance of the slider. For example, inside the loop that begins
FOR CUR_FEATURE_REC IN CUR_FEATURE (vTerminal_id)
LOOP
It is valid to say
IF CUR_FEATURE_REC. FEATURE_TYPE_ID > = 1000 THEN
However, until you open an instance of the slider, he extracted all data (for example, FEATURE_TYPE_ID), therefore impossible to refer to the instance or its columns.
What exactly are you trying to do?
-
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.
-
PLS-00323: subprogram or cursor...
Hi all:
I am getting the error PLS-00323 and don't know why.
I can compile the original packet header / body without error, but as soon as I change a definition in both places, this error occurs on a line so close to my changes.
Header of the original packet:
PROCEDURE clean_temp_data;
Original Package body:
PROCEDURE clean_temp_data
IS
When I change that, I have error "PLS-00323: subprogram or cursor"CLEAN_TEMP_DATA"is declared in a package specification and must be defined in the package body.
New package header:
PROCEDURE clean_temp_data)
p_Filename IN VARCHAR2,
p_EbizTranNo in NUMBER);
New Package body:
PROCEDURE clean_temp_data)
p_Filename IN VARCHAR2,
p_EbizTranNo in NUMBERS)
IS
I see no spelling differences, differences of parameter type, header compiles without any problem, but the package body gives me this errror on line 159, which has no connection with this procedure, that procedure does not start until the line of 1513.
What is the cause and how to fix it? It makes no sense to me.
Thank you
AndyHello
The best way to ensure that you don't make a mistake in the statement is probably to copy the spec' statement in the body. I hope that you did?
A way possible to reach this error, is that the procedure from far inside the other, as below. This would be the case? -If so, a good idea is always to end-identifiers as I do below.
SQL> create or replace package pck 2 as 3 procedure p1; 4 procedure p2; 5 procedure p3; 6 end pck; 7 / Package created. SQL> SQL> create or replace package body pck 2 as 3 procedure p1 4 is 5 procedure p2 6 is 7 begin 8 null; 9 end p2; 10 begin 11 null; 12 end p1; 13 14 procedure p3 15 is 16 begin 17 null; 18 end p3; 19 end pck; 20 / Warning: Package Body created with compilation errors. SQL> SQL> show errors Errors for PACKAGE BODY PCK: LINE/COL ERROR -------- ------------------------------------------------------------- 4/14 PLS-00323: subprogram or cursor 'P2' is declared in a package specification and must be defined in the package body SQL>
In addition, note the line number it's 4. This is the line number of the specification. If your interpretation
but the package body gives me this errror on line 159, which has no connection with this procedure, that procedure does not start until the line of 1513.
seems wrong. The compiler wouldn't know where you would put the body.
A way to solve your problem must begin with comment on the procedure described in the specification and continue to comment on things until you find your error.
Concerning
Peter -
pls-00323: subprogram or cursor "Dec" is declared in the package specification
Hello
How to fix the error below
in fact, my code is herepls-00323: subprogram or cursor 'Drec' is declared in package specification and must be defined in the package body
Spec
bodycreate or replace package x is type typ_x277 is record ( rcncd fin_rcn_grp_mas.rcn_cd%type, icode item_master.item_code%type, idesc item_master.short_desc%type, ob_qty Number, rcpt_qty number, issue_qty number, incr_qty number, Rate number, incr_value number); type ref_x277 is ref cursor return typ_x277; Procedure drec(x277_rec in out ref_x277,rcncd varchar,fdate date,tdate date); end x;
my spec is perfectly compiled where the body becomes the error said above.create or replace package body x is Procedure drec(x277_rec in out ref_x277,rcncd varchar2,fdate date,tdate date) as Begin open x277_rec for Select rcn_cd,item_code,short_desc,op,rcpt,issu,incrqty,month_rate,incrqty*month_rate incrvalue from( Select rcn_cd,item_code,short_desc,find_item_opening(item_code,fdate) op,rcpt,issu,(find_item_opening(item_code,fdate)+rcpt) - issu incrqty,month_rate from( select rcn_cd,a.item_code,short_desc,month_rate,sum(nvl(mrir_qty,0)) Rcpt,sum(nvl(issue_qty,0)) issu from( select item_key,b.rcn_cd,mrir_ccn(a.po_no,a.item_code) as ccn,a.item_code,sum(a.quantity) as mrir_qty, null issue_qty from kar a,fin b where trunc(a.document_date,'DD') between fdate and tdate and b.rcn_cd=rcncd and mrir_ccn(a.po_no,a.item_code)=b.ccn_cd and nvl(a.quantity,0) > 0 and a.card_code = '50' group by item_key,b.rcn_cd,mrir_ccn(a.po_no,a.item_code),a.item_code having sum(a.quantity) > 0 union select item_key,b.rcn_cd,a.ccn,a.item_code,null mrir_qty, sum(a.quantity) as issue_qty from kardex a,fin_rcn_grp_mas b where trunc(a.document_date,'DD') between fdate and tdate and b.rcn_cd=rcncd and a.ccn=b.ccn_cd and nvl(a.quantity,0) > 0 and a.card_code in ('70','71','72') group by item_key,b.rcn_cd,a.ccn,a.item_code)a, item_master b,item_quantity c where a.item_code = b.item_code and a.item_key = b.item_key and a.item_key = c.item_key and b.item_key = c.item_key group by rcn_cd,a.item_code,short_desc,month_rate having sum(nvl(mrir_qty,0)) > 0 order by rcpt desc,a.item_code)); end; end x277;
How to recover this question.
IqbalIn spec you have this
Procedure gillison (x277_rec in ref_x277, rcncd varchar, date, date of tdate fdate);
In the body, you have this
Procedure gillison (x277_rec in ref_x277, rcncd varchar2, date, date of tdate fdate) as
for rcncd in spec its VARCHAR and the body its VARCHAR2. Change both to VARCHAR2
-
Hi gurus,
Your help is greatly appreciated.
Will I have a fucntion where we have the object it contains.
The changes that I have doen are: 2 new cusrosrs, but its failure with the error below.
Highlighted are the changes I made. his length very well before your help is greatly appreciated.
1) PL/SQL: ORA-00904: "GET_ACQ_ID.". ' ACQ_ID ': invalid identifier.
(2) PLS-00225: subprogram or cursor reference 'GET_ACQ_ID' is out of range
Here is the code:
_________________________________________________________________________
FUNCTION GET_IP_COMM_INFO return PROD. TERMINAL_IP_COMM_INFO_TAB IS
vTer TER.ter_id%TYPE;
vAPPL_ID TAC.appl_id%TYPE;
vValue TSF.vALUE%TYPE;IP_COMM_INFO_LIST PROD. TERMINAL_IP_COMM_INFO_TAB: = PROD. TERMINAL_IP_COMM_INFO_TAB();
CURSOR GET_ACQ_ID IS
SELECT ACQ_ID
TER TAHA, MERC M, PROF
WHERE T.MER_ID = M.MER_ID
AND M.PROFID = P.PROF_ID
AND T.TER_ID = vTer_id;
CURSOR GET_INFO_CURSOR IS
SELECT H.DESCRIPTION AS HOST_DESCRIPTION
PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI
WHERE (AICAI. HOST_ID = H.HOST_ID) and
(AICAI. APPL_ID = vAPPL_ID);CURSOR GET_ACQ_CURSOR IS
SELECT H.DESCRIPTION AS HOST_DESCRIPTION
PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
WHERE (AICAI. HOST_ID = H.HOST_ID) and
(AICAI. APPL_ID = vAPPL_ID) AND
(ACQUIRER_ID = GET_ACQ_ID. ACQ_ID);
BEGIN
vTer_id: = GLOBAL_VARIABLES.gv_ref_Ter_id;BEGIN
SELECT the VALUE IN vvalue OF Tsf
WHERE TER_id = vTEr_ID AND APPL_ID is vAPPL_ID and FEATURE_ID = 861;.Vvalue = '04' IF THEN
For GET_ACQ_REC IN GET_ACQ_CURSOR
LOOP
IP_COMM_INFO_LIST. EXTEND;
IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
END LOOP;
ON THE OTHER
FOR GET_INFO_REC IN GET_INFO_CURSOR
LOOP
IP_COMM_INFO_LIST. EXTEND;
IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_INFO_REC. HOST_DESCRIPTION);
END LOOP;
END IF;RETURN IP_COMM_INFO_LIST;
EXCEPTION WHEN OTHERS THEN
LIFT;
END GET_IP_COMM_INFO;----------------------------------------------------------
You try to access another variable of slider within the slider...
CURSOR GET_ACQ_CURSOR IS
SELECT H.DESCRIPTION AS HOST_DESCRIPTION
PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
WHERE (AICAI. HOST_ID = H.HOST_ID) and
(AICAI. APPL_ID = vAPPL_ID) AND
(ACQUIRER_ID = GET_ACQ_ID. ACQ_ID );
But you have not opened this slider, or anything like that.
You will probably need to pass as a parameter, just like a function:
(not sure of the type of data, so I assumed that the NUMBER)
CURSOR GET_ACQ_CURSOR (NUMBER in_acq_id) IS
SELECT H.DESCRIPTION AS HOST_DESCRIPTION
PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
WHERE (AICAI. HOST_ID = H.HOST_ID) and
(AICAI. APPL_ID = vAPPL_ID) AND
(ACQUIRER_ID = in_acq_id );
When you call this type, you must pass a value... So, it seems that you first call the other cursor.
Change this code:
IF Vvalue = ' 04 "THEN
FOR GET_ACQ_REC IN GET_ACQ_CURSOR
LOOP
IP_COMM_INFO_LIST. EXTEND;
IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
END LOOP;
ON THE OTHER
To do this:
IF Vvalue = ' 04 "THEN
FOR GET_ACQ_ID_REC IN GET_ACQ_ID IS
LOOP
FOR GET_ACQ_REC IN GET_ACQ_CURSOR (get_acq_id_rec.acq_id)
LOOP
IP_COMM_INFO_LIST. EXTEND;
IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
END LOOP;
END LOOP;
ON THE OTHER
(Or something like that)
I wasn't sure if your GET_ACQ_ID cursor returns only 1 row or not? If it returns more than 1 row, how to cope, you do not specify.
If it's just 1 row, then you can probably simplify it a little more:
IF Vvalue = ' 04 "THEN
SELECT ACQ_ID
in l_acq_id
TER TAHA, MERC M, PROF
WHERE T.MER_ID = M.MER_ID
AND M.PROFID = P.PROF_ID
AND T.TER_ID = vTer_id;
FOR GET_ACQ_REC IN GET_ACQ_CURSOR (l_acq_id)
LOOP
IP_COMM_INFO_LIST. EXTEND;
IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
END LOOP;
ON THE OTHER
Hope that helps.
-
Why the automatic updates keep turn off? error number 080070424
Why updates automatic keep turning off and error message 080070424
You will need to maybe do that . If you are on Skype add me. And I'll be able to help you. My Skype name is the same name I use here
-
How can I turn off the error 'no internet connection '? I am on wireless and my internet connection is often intermittent. This popup is really boring.
Thank you
you have to start the application of office cc, at most, once every 30 days. and if you have an annual subscription, simply start it once all the 91 days.
so, in your cc preferences, uncheck "Start on login" and close it.
-
G20-110: the cursor flies off - erratic keys?
Howdy,
Just bought a "G20-110' and I have problems when entering.» I'll be happily typing away and then all of a sudden the cursor somewhere flys and removed characters? .. .anyone else facing this problem or have any idea why this is happening?Press Fn + F9 to turn off the touchpad while you type.
Later,.Alcahest
-
Get cursor references in a waveform graph
Is it possible to get a picture of the cursor for a graph references? I realize there is a table of list of cursor, but it would be much better to have references.
Thanks Ben. I just wanted to check before riding mine, and I appreciate the quick response.
Here is the code snippet does it, but I hope that it will be added to the native properties.
-
Coordinates of the cursor - turn off?
Hi world Ps,
I'm sure that there is a simple solution... When I move a layer, coordinated my cursor is displayed. I want to turn off. But how?
See photo...
Thank you very much
Michael.
Preferences > tools
Show Transformation values: never
-
Cursor reference and dynamic views
Hi all,
Oracle 9i.
Have a package body that uses the view v$ logmnr_contents and returns its contents via a ref cursor The data from this point of view
only persists between package calls dbms_logmnr.start_logmnr and dbms_logmnr.end.
Problem I have or maybe the thing I don't understand is the part of code that simply
count the lines in this view works fine, but the code that fills the ref cursor (p_recordset)
does not say that dbms_logmnnr.start_logmnr must be called before you try to read v$ logmnr_contents.
I know that this code works very well on a static table - see commented article of the declaration of ref cursor
Thanks in advance,
Dave
CREATE OR REPLACE PACKAGE BODY "LOGMNR. "' LM_PACKAGE ' as
procedure lm_procedure)
p_filename IN varchar2,
p_recordset ON lm_cursor
p_recordcount NUMBER,
p_errorcode NUMBER) IS
Start
p_errorcode: = 0;
p_recordcount: = 0;
DBMS_LOGMNR. ADD_LOGFILE (nom_fichier_journal = > p_filename, Options = > dbms_logmnr.) (NEW);
DBMS_LOGMNR. Start_logmnr (DictFileName = > ' TURLIVE_DICTIONARY.) ORA', Options = > DBMS_LOGMNR.COMMITTED_DATA_ONLY);
Select count (*) in precordcount of v$ logmnr_contents; _
Open SELECT p_recordset * from
-logmnr.logmnr_contents1
v$ logmnr_contents
where seg_owner = 'SONICA' and operation ("INSERT", "UPDATE", "DELETE");
DBMS_LOGMNR. END_LOGMNR;
commit;
exception
while others then
p_errorcode: = SQLCODE;
end lm_procedure;
end lm_package;
Script of PL/SQL that is used to test this procedure.
==================================
Set serveroutput size 1000000
declare
v_rc NUMBER;
number of v_ec;
r sys_refcursor;
REC logmnr.logmnr_contents%rowtype;
Start
v_rc: = 0;
v_ec: = 0;
logmnr.lm_package.lm_procedure('TURLIVE_T1_S18907.) ARC_RMAN', r, v_rc, v_ec);
loop
extract the r in rec;
out when are % notfound;
dbms_output.put_line (Rec.ROW_ID);
end LOOP;
end;
Error report:
ORA-01306: dbms_logmnr.start_logmnr () must be called before you choose to v$ logmnr_contents
ORA-06512: at line 15 level
01306 00000 - "dbms_logmnr.start_logmnr () must be called before you choose to v$ logmnr_contents.»
* Cause: Select has been issued by v$ logmnr_contents without appeal of the first
the dbms_logmnr.start_logmnr () procedure.
* Action: Invoke the dbms_logmnr.start_logmnr () procedure before issuing
a select the view v$ logmnr_contents.You would have to materialize the data in a certain way.
-
Oracle 11 g 2 Linux x86_64
Hi all
I do turn the PL/SQL block below, but get the error below. I know, the INTO clause can be used only when a single line will be returned. In this case, I know that it returns multiple lines, so why he asked to use the INTO clause?DECLARE
v_object VARCHAR2 (10): = "TABLE";
v_schema VARCHAR2 (30): = 'TEST ';
CURSOR tblsze_cur IS
SELECT table_name
FROM dba_tables
Owner WHERE = 'TEST '.
AND (IN) table_name
"T1"
"T2."
"T3");
BEGIN
FOR tbl_rec IN tblsze_cur
LOOP
Select * from
Table (dbms_space. OBJECT_GROWTH_TREND
(v_schema, tbl_rec.table_name, v_object)) ;
END LOOP;
END;
/
Select * from table (dbms_space. OBJECT_GROWTH_TREND
*
ERROR at line 21:
ORA-06550: line 21, column 3:
PLS-00428: an INTO clause in this SELECT statement
It would be something more like this (untested)...
Set serverout on
create type object_growth_trend_row as object)
validating TIMESTAMP,
space_usage NUMBER,
space_alloc NUMBER,
quality VARCHAR (20))
/Create type object_growth_trend_table as table of the object_growth_trend_row
/DECLARE
number of r;
We varchar2 (30): = 'SCOTT ';
TYPE nmtbl IS TABLE OF THE all_tables.table_name%TYPE;
tNom nmtbl;
tgrowth object_growth_trend_table;
CURSOR c1 IS
SELECT table_name
From all_tables
Owner WHERE we =
AND table_name in ('EMP', 'Department');
growth of cursor (tablename in varchar2) is
Select *.
table (dbms_space.object_growth_trend (tablename, 'TABLE'));
BEGIN
OPEN c1;
FETCH c1 COLLECT LOOSE tNom;
CLOSE c1;
BECAUSE me IN tNom. FIRST... tNom. LAST
LOOP
r: = 0;
dbms_output.put_line (' growth for table: ' | tname (i));
FOR g IN growth (tname (i))
LOOP
r: = r + 1;
dbms_output.put_line ('Timestamp: ' | g.timePoint |') Use: ' | g.space_usage);
END LOOP;
DBMS_OUTPUT. Put_line (' found lines: ' | r);
END LOOP;
END;
/I just tested this in my SYS schema (although you should not create objects in SYS.) and got...
For table growth: EMP
EXCEPTION in the treatment of the Charles - code:-14551 msg: ORA-14551: cannot perform a DML operation inside a query
Timestamp: 3 July 13 09.15.27.250000 use: 5332
Found lines: 1
For table growth: DEPT
EXCEPTION in the treatment of the Charles - code:-14551 msg: ORA-14551: cannot perform a DML operation inside a query
Timestamp: 3 July 13 09.15.27.282000 use: 4846
Found lines: 1
Not sure why it's up the DML operation... which seems inner exception to the dbms_space package. Even if I just run it directly in sys like this:
SQL > SELECT *.
2. IN the TABLE (dbms_space.object_growth_trend ('SYS', ' $', TAB 'TABLE'));AFTER SPACE_USAGE SPACE_ALLOC QUALITY
--------------------------------------------------------------------------- ----------- ----------- --------------------
3 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
4 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
JULY 5, 13 09.19.01.956000 10342201 24117248 INTERPOLATED
6 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
7 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
8 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
9 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
10 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
JULY 11, 13 09.19.01.956000 10342201 24117248 INTERPOLATED
12 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
13 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
14 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
15 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
16 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
17 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
18 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
19 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
20 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
21 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
22 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
23 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
24 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
25 JULY 13 09.19.01.956000 10342201 24117248 INTERPOLATED
26 JULY 13 09.19.01.956000 10342201 24117248 GOOD
27 JULY 13 09.19.01.956000 10342201 24117248 GOOD
28 JULY 13 09.19.01.956000 10342201 24117248 GOOD
29 JULY 13 09.19.01.956000 10342201 24117248 GOOD
30 JULY 13 09.19.01.956000 10342201 24117248 GOOD
31 JULY 13 09.19.01.956000 10342201 24117248 GOOD
1ST AUGUST 13 09.19.01.956000 10342201 24117248 GOOD
2 AUGUST 13 09.19.01.956000 10342201 24117248 GOOD
3 AUGUST 13 09.19.01.956000 10342201 24117248 PLANNED
4 AUGUST 13 09.19.01.956000 10342201 24117248 PLANNED
5 AUGUST 13 09.19.01.956000 10342201 24117248 PLANNED
6 AUGUST 13 09.19.01.956000 10342201 24117248 PLANNED
7 AUGUST 13 09.19.01.956000 10342201 24117248 PLANNED36 selected lines.
EXCEPTION in the treatment of the Charles - code:-14551 msg: ORA-14551: cannot perform a DML operation inside a query
... She still throws the exception.
Doesn't seem like a package of well designed if the types are provided only in the package and not as objects of database, which are required to be used in SQL based in pipeline.
-
ORA-06553: PLS-306: wrong number or types of arguments errors
Hi friends,
When executing the below function I get error like
I use the program version 2.1 sql Oracle.
============================
ORA-06553: PLS-306: wrong number or types of arguments in the call to 'FUNC_TEST '.
06553 00000 - "PLS - %s: %s.
============================
CREATE OR REPLACE FUNCTION FUNC_TEST
RETURN SYS_REFCURSOR
AS
PRAGMA AUTONOMOUS_TRANSACTION;
total_val number (5): = 65;
REF_TEST SYS_REFCURSOR;
cursor c1 is
Select substr(data,1,3). substr(Data,5) new_col text_1 update of data;
BEGIN
FOR employee_rec in c1
LOOP
text_1 update
data value = substr (employee_rec.new_col, 1, 4). Chr (total_val) | substr(employee_rec.new_col,5) location being the c1;
total_val: = total_val + 1;
If total_val > 90 then
total_val: = 65;
end if;
end loop;
commit;
REF_TEST OPEN for SELECT data FROM text_1;
RETURN REF_TEST;
END;
-----------------------
Table script:
create table text_1
(
given varchar2 (20)
)
insert into text_1 values ("IAL030003IND")
Please suggest.
Thank you
Lony>
Yes, I also used a procedure and its fine in the working procedure.But according to her does not work... Or how can spend us in parameter to this function so that it can work?
. . .
If I am performing the function of the query below and I don't want to pass any parameterSelect double FUNC_TEST;
I get the error message like
{,}
>
Your problem is that the function returns a ref cursor - that is a pointer to a result set. You can't put a ref cursor in a cell in the grid.The only reason why the procedure is 'work' is probably because you do not use a ref cursor in the version of the procedure.
Why would you use a function that combines the data of attachment with the return of the data as a Ref Cursor? Once the data are set, there are fixed if you call the function a second time, that your data will be be stripped.
If you want to return a Ref Cursor then you must use the function in the FROM clause: SELECT * FROM TABLE (myFunc ())
-
After working fine for a week, today the Netflix service is not accessible. I get the message "the service is not available at the moment; reference 300 "code.
My internet connection speed is 10 MB/s, and I can listen to Pluzz.fr other devices.What is this problem and how is it fixed?
Yep, I'm getting this too. Usually, a reboot of the netflix app has been around but it is annoying and wasting my time.
Between that and other issues of netflix, I'll probably have to switch to the use of my PS3 for purposes of netflix that I was trying to avoid for convenience and energy consumption.
Maybe you are looking for
-
faces of photos can not enter the name correctly
At apple watch this first year to own the mac out of support now, later they are working on this and can include a fix in an update awhile. not impressed.
-
I'm unable to update to the new version, "refusing to proxy server connection.
I am running version 3.6.3 right now and I was not able to do the latest updates updated, because once that I go through the download process and to launch Firefox I get the message "proxy server refuses connections please try again later, and I'm un
-
Cannot read the new videos on my laptop which uses Windows Vista. Help?
Hi, two days ago I did something to erase my ability to play videos on American sites and I think it has something to do with Adober Flash Player. If I try to play a video on CNN, MSNBC, etc. of the New York Times, I get a message to install Adobe. W
-
Updates, which now trains [resolved] blue screen
So I recently had to wipe my computer and reinstall windows from scratch, however I can't seem to get windows 7 update at all. He never leaves the screen in this picture and I even let stand for hours to update with nothing happening. I also have the
-
error COAA0402 Ox. What that means and what can do
When I try to create a hot spare, the DVD player comes up with the error COAA0402 Ox. What that means and what can do