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.
Tags: Database
Similar Questions
-
Hi I would like th different creative cloud buy 2, only photoshop/lightroom one and the other with all pack.is it is possible because I saw that we can only install on 2 different computers at the same time
Creative desktop cloud applications can be downloaded and installed on multiple computers, regardless of the operating system. However, the activation is limited to two machines per individual related to the composition, and you may not use the software on these devices simultaneously.
You can also see:
FAQ: Can I install Creative Cloud on several computers?
You can either sign of Creative cloud on a computer to connect to another, or as you said, buy a membership second using an AdobeID different so that you can leave, signed at on 4 computers.
-
In the levels layer, I have only the option of 'grey '. When I create a fill layer, I can only see different levels of grey, not the color I chose. How can I change this?
Hi elizabethu,
Greetings!
Make sure that the image is not in gray mode.
If it is to change it to RGB mode.
Image-> Mode-> RGB
And try again.
Concerning
Jitendra
-
want to add text effect, I can only add effect of block of text, the box is not an option to add text effect it self of ideas?
Hello.
Please refer to the link below which explains this scenario very well.
Appllying effects shots, bevel, glow to text
Concerning
Vivek
-
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
-
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.
-
I am a teacher in South Australia. Can I get a discount when you purchase the package Adobe Cloud?
Try https://creative.adobe.com/plans?plan=edu&store_code=au&locale=en
-
Original title: Windows key that is no longer clean installs
I so got my copy of Windows 7 for about 2 years now. I got a full version of Windows 7 OEM (and not an upgrade).
I've done several installs own all the while to fix bugs, install new hardware or just simply to clean my computer. My product key worked every time.
Last week my hard drive failed and I replaced it. During the installation of Windows 7 it says that my product key is incorrect, even though it was perfect and I've tried several times. So I checked the option activate later.
Now, I just got the popup to activate and when I enter my key it tells me that it can only be used to improve and not not clean installs it. I used it for clean installs several times and it was the full version, I bought it.
What became of my key?
If the online activation failed activation of the phone, but do not answer all prompts until the opportunity to talk to a real person, and then explain
-
WMC 7 can only detect 2 analog tuners instead of the ATSC tuners
Hello, I saw that a similar post about QAM channels however in this case I use an antenna. I will let you know the material 1. . AMD Phenom II X 6 1055 t. processor 2.8 Ghz/w 4 GB RAM w / Hauppauge 2250 dual tuner ATSC Antenna FM/UHF/ATSC 4bay
The question... WMC will not detect digital signals, it allows to detect the analogue, to test the equipment that I tried WinTV7 - has worked well, HWCleared, reset WMC downloaded and installed WMC hauppage set-up ' site, run the whole upward. I live in downtown Toronto near towers so the signals are strong enough defintely (as I mentioned WinTV can find them) however runs the TV Signal configuration, it seems to download the thin data signals tv installation, when it then try look at the TV he replies with 'WMC is unable to determine the configuration of the TV signal' I try to configure it manually Select antenna and it still lists only 2 analog tuners.
My hope is that someone else has encountered this and has a solution where the WMC can do what it stimulates and will detect the ATSC Tuners.
Thanks in advance for any help
http://thegreenbutton.com/blogs/pnear/archive/2009/08/10/enabling-ATSC-amp-QAM-in-Canada-for-Windows-7-RTM.aspx S.Sengupta Media Center MVP
-
I can only convert files from my computer (and storage devices) or am I able to download and convert my OneDrive files?
Hi Lisa,
I'm sorry but the only currently available storage is Cloud Doc Adobe and Microsoft Sharepoint.
From now you would not be able to download files and convert OneDrive files.
Concerning
Sukrit diallo
-
CMS power off is the only way to have specific colors on the screen
Definition of the color settings in CS5 ID on 'Emulate Adobe Indesign 2.0 CMS' OFF is the only setting that allows for exact on the screen display colors (colors match the printed book shade Pantone Process)
All the other parameters that you are supposed to use fact colors off - too bright/intense for most.
I tried several different combinations, including in North America General Purpose 2 and uncoated sheets (which is how it will be printed).
I have the document to CMYK and using only CMYK palette.
I was wondering why this is?
I have not the case. Is this just a case of calibrate the monitor to match one of the CMS settings then?
-
Debug/run procedures within the package
Debugging with SQL Developer was generally very nice and I have come to rely on these tools. Today, I've written a procedure in a package and I want to debug this process, but I don't see it in the list of targets. It seems that I see only functions in the target list. I understand that the procedures need not have the same kind of output in function, but sometimes I like to create procedures that have multiple SETTINGS, especially when it comes to an exit very closely related.
The interesting thing is that I can create this same procedure as a stand-alone procedure and the run/debug works great. Apparently I'm missing something obvious in SQL Developer somewhere I thought it was there all the time (I guess for a while since I've written a procedure with OUT parameters) but maybe I'm wrong. Any ideas or help someone?
Earl
It should work.
Is that you can create a package of simple heel with just a function procedure that is a NULL; and use it as a test?
If this does not work there either, please send a screenshot so we can see what you see in the debugging with the missing procedure dialog box.
-
wrap the procedure in the package
Hi all
Is it possible to encapsulate some of the procedures or functions in the package in Oracle 11 g? For example if I have 4 procedures overall, I want only 2 of them to be wrapped up.
Thanks in advance,
Alexander.
No, but you can always create a separate package containing the procedures you want to encapsulate only.
-
Can not see the package body in SQL Developer version 3.1
Hello
Have walked the boards and google for that matter for some time now. I think I found the problem, but would like to if there is a work around.
Problem:
I'm unable to view packages, procs, VIEWS DOF, etc. of other users. When one of my colleagues use Toad, with the EXACT same connection ID and the parameter, they are indeed able to see all the source code...
What I found:
Looking around, apparently Toad and SQL Dev work in different ways. Toad a use apparently DBA_SOURCE and DBA_OBJECTS to generate everything.
SQL Dev using package META_DATA to retrieve everything. In addition, in order to use the package meta_data, I need the catalog of grant role, or something like that.
Is it possible to set up the SQL Developer to use the same method as the toad to get the code? It is a fact that I WILL NOT receive the catalogue by the DBA permission... I can write the
Select the text from DBA_SOURCE where OWNER = 'OWNER' and NAME = 'OBJECT NAME';
But I would rather just be able to use the nodes in the tree and click on the objects to generate all this. Anyone know of any setting for this?Hello
No doubt Developer SQL wants to be competitive with the Toad, but in terms of raising red flags on the inconsistencies in the basic features, any difference from SQL * Plus would be more surprising than Toad.
DBA_SOURCE and DBA_OBJECTS are synonymous publicly available in any standard Oracle installation, but you also get to PICK ANY DICTIONARY to get the maximum benefit from them. Which will display the code in the schema of another user without having a privilege explicit (such as EXECUTE) on a function/procedure/package.
If you already have privileges (SELECT ANY DICTIONARY, or EXECUTE or DEBUG on specific executable objects), and the Code tab is empty, you will need to provide a test case, according to Vadim.
With respect to cases where the SQL Developer uses DBMS_METADATA, my understanding is that the API relies on the SELECT_CATALOG_ROLE privilege, if a user has or otherwise have a granted privilege explicitly on an object. Developers like to use this API in the extent possible instead to write a script that could break or need maintenance to deal with future versions of the Oracle database.
I have no idea how works the Toad, and probably I should not speculate, but here's a scenario that might explain the case you mention without that user of connection with one of the above privileges. Let's say that the client software of Toad calls a PL/SQL package that selects from DBA_SOURCE and is installed in a pattern that has the privilege to CHOOSE ANY DICTIONARY. All users of Toad are granted EXECUTE on this package and therefore inherit SELECT ANY DICTIONARY in the execution of the package. It will work, but at the cost of complicating the installation of Toad. Also, he is not giving them a precise control of metadata security administrator.
Kind regards
Gary
SQL development team -
fusion of procedures in the package and calling with common proc?
Hello
I wrote similar procedures... and I'm calling each procedure separately and transmitting his values...
something like that
My question is how to merge these two procedures in one package and call them with a common procedure and pass the value (var_id) once for procedures?begin mov_tbl1(1234); end then again similarly for begin mov_tbl2(1234); end;
I m bit confused, if you want to use the parameter or parameter... .i am beginner in writing packages... :))create or replace procedure mov_tbl1 ( var_id number) is cursor tbl1_cur as select src.col1, src.col2, from abc_tbl1 tbl1, abc_tbl2 tbl2 where tbl1.no = var_id -- this is variable i m trying to make it as a paramter in common proc tbl1.id = tbl.id -- the record variable declaration is implicit in FOR LOOP begin for tbl1_cur_rec in tbl1_cur loop begin insert into tgt.tabl1(col1,col2) values (tbl1_cur_rec.col1, tbl1_cur_reccol2, ); exception when others then null; end; end loop; end; create or replace procedure mov_tbl2(var_id number) is cursor cur_tbl2 select col3,col4, col5 ...... from abc_tbl1 tbl1, abc_tbl2 tbl2, abc_tbl3 tbl3 where tbl1.no = var_id and --this is variable i m trying to make it as a paramter in common proc tbl1.id = tbl.id and tbl2.dept = tbl3.dept begin for ... loop ... insert into ... values.... .... end;
Ideas or examples is greatly appreciated! Thank you very much!!Check if all parameters have been assigned to certain values.
And call the procedure that is packaged with the following syntax.
Begin
. (parameter_value); end; i.e. Begin TEST_PACK.COMMON_PROC(1234); End; Can you post the code here so that we can have a look at what goes wrong.
Here is a test package I ran
PRAZY@11gR1> create or replace package test_pack as 2 procedure common_proc(var_id number); 3 end; 4 / Package created. Elapsed: 00:00:00.00 PRAZY@11gR1> create or replace package body test_pack as 2 procedure private_proc1(var_id number) as 3 begin 4 dbms_output.put_line('FROM PROC1 :'||var_id); 5 end; 6 7 procedure private_proc2(var_id number) as 8 begin 9 dbms_output.put_line('FROM PROC2 :'||var_id); 10 end; 11 12 procedure common_proc(var_id number) as 13 begin 14 private_proc1(var_id); 15 private_proc2(var_id); 16 end; 17 18 end; 19 / Package body created. Elapsed: 00:00:00.04 PRAZY@11gR1> begin 2 test_pack.common_proc(100); 3 end; 4 / FROM PROC1 :100 FROM PROC2 :100 PL/SQL procedure successfully completed. Elapsed: 00:00:00.01
Kind regards
Prazy
Maybe you are looking for
-
Hi, I have recently updated to Firefox 33, unfortunately, the police is blurred, as for example when searching for things in YouTube with a list of suggestions. Is it possible to disable this blurry font and do as the police as in Firefox 3.6 where i
-
Finder doesn't save preferences after reboot
Hello. For Yosemite, now on El Capitan 10.11.4 I have this bug. In the Finder, I push "Button point Arrangement" (point), choose one of them (for example, sort by name), and then click "Use as Defaults", and then restart my Imac, open Finder, I see t
-
Trying to replace a table in a cluster
I have a table 1 d to a type with a cluster of 5 elements. One of the elements is a picture that I want to replace. Can someone help me understand how to do this? Thank you.
-
I installed ie8 security was last updated. Now I'm in a 'loop', he says constantly ready to install, I click on install, then I reboot, then he asks the same question again, ready to install, I click Yes then I have to restart, then when windows star
-
RELOADED xp disk window but do not have 25 digit key
my computer did not open and it was request I run my windows xp sp3 disk did it, but I don't have a 25 character key for activate windows. I was not issued with key code when I bought my computer.