How to apply the procedure inside a procedure and the evils of the value in a variable?

Hi all

I'm usung oracle 11g.

Here is my package and procedure

I want to call get_email_details this procedure within the process_email_master and store the value in a variable in main proceedings

create or replace

PACKAGE ms_gen_process_email

as

type email_type is rendered (subject varchar2 (4000 tank),

email_body varchar2 (4000 tank),

to_receipent varchar2 (4000 tank),

cc_receipent varchar2 (4000 char));

type email_type_table is table of the email_type;

procedure process_email_master)

p_metric_name IN VARCHAR2,

p_current_stage in varchar2,

p_action in varchar2,

p_pid number,

P_OBJECT_ID in varchar2

-p_emai_master on p_email_type_table

);

PROCEDURE get_email_details)

p_metric_name IN VARCHAR2,

p_current_stage in varchar2,

P_ACTION in varchar2,

p_email_type_table1 on email_type_table

) ;

END ms_gen_process_email;

----

create or replace

PACKAGE ms_gen_process_email BODY

as

procedure process_email_master)

p_metric_name IN VARCHAR2,

p_current_stage in varchar2,

p_action in varchar2,

p_pid number,

p_object_id in varchar2

)

as

Start

null;

EXCEPTION

WHILE OTHERS

then

null;

end process_email_master;

PROCEDURE get_email_details)

p_metric_name IN VARCHAR2,

p_current_stage IN VARCHAR2,

P_ACTION in varchar2,

p_email_type_table on email_type_table

)

as

BEGIN

Select the object, email_body, to_receipent, cc_receipent

bulk collect into p_email_type_table

of ms_gen_email_config_detail

WHERE email_key =)

SELECT email_key

OF ms_gen_email_config

WHERE metric_name = p_metric_name

AND action p_action =

and current_stage = p_current_stage

);

for me in p_email_type_table.first... loop of p_email_type_table. Last

dbms_output.put_line (p_email_type_table (i) reserve .under | p_email_type_table (i) .email_body: p_email_type_table (i) .to_receipent: p_email_type_table (i) .cc_receipent);

end loop;

EXCEPTION

WHILE OTHERS

THEN

NULL;

END get_email_details;

END ms_gen_process_email;

but I get this error message

Error (15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared

Concerning

Dale

See below the test case and change your code. You can call the procedure in detail within a main as procedure below

CREATE or REPLACE PACKAGE test_pkg AS

TYPE rec_val IS RECORD (empno, emp.empno%TYPE,

Ename emp.ename%TYPE

);

TYPE nt_tabtest IS TABLE OF THE rec_val;

PROCEDURE get_email_id (p_type to nt_tabtest);

PROCEDURE get_email_master;

END;

/

CREATE or REPLACE PACKAGE test_pkg BODY

AS

PROCEDURE get_email_id (p_type ON nt_tabtest)

AS

BEGIN

SELECT EmpNo, ename COLLECT in BULK in p_type FROM emp;

END;

PROCEDURE get_email_master

AS

v_type nt_tabtest;

BEGIN

get_email_id (v_type);

BECAUSE me IN v_type. FIRST... v_type. LAST

LOOP

DBMS_OUTPUT. Put_line (v_type (i) .empno: v_type (i) .ename);

END LOOP;

END;

END;

/

Post edited by: 000000

Tags: Database

Similar Questions

  • How to set the value of a variable in automator?

    I'm totally new to automator I found a post that I try to reuse

    to Re: copy multiple files from TextEdit in one Word file

    I want to open a series of html files in a folder and convert in a TextEdit rtf file.

    However, I am unable to automator find out how set the value of a variable such that it appears in this post

    I looked at every command in library without a lot of fortune

    Any help?

    Thank you

    Dan

    Its in Utilities.

    In Automator, use the search box:

  • How to assign the value of a variable to a quiz?

    Hi, I have a problem, I attempted to set the value of a variable for the quiz on the final value of the project, any suggestions?

    Sorry but I do not understand your question at all. If you talk about a quiz like cpQuizInfoPointsscored or cpInfoPercentage system variable, this is all simply impossible because the system variables are read-only.

  • How to apply the value of the POWN in the codification

    Dear experts,

    I have a few question on value POWN and how to apply consolidation,

    I am aware that if the 'rules of Consolidation' defined on N the application only to roll up the value PCON and ignore the value of POWN

    Should what step I do if I want to assign value POWN equity? can I configure the setting of 'Rules of Consolidation' app to N? should I set the consolidation to POWN method? If Yes can you list down the step should I do to make the consolidation method to affect my value of consolidation?

    Thank you for your help

    To consolidate by using your own methods of consolidation, you must define the rules of Consolidation to Y. Then you will need to create methods of consolidation in the metadata, you will use in your code when you implement the routine void Consolidate() to control which parts of the code of the consolidation, it will run. By defining the consolidation in the metadata methods also make you it accessible to property management to select the method of consolidation right for each entity. Then, in your code of consolidation, you will use your custom logic to control which parts of the data are going to be proportionalized by PCON and who by POWN.

    -Kostas

  • How to control the value of a variable that is shared at the beginning of the vi

    Hi all

    In short: How can I make sure the values of the variables shared at the start of a vi?

    I have two vi.

    One is a main vi where did I order a shared Boolean variable "run DAQ".

    The other is a vi with a while loop that "polls" for the shared variable "Execute DAQ", which is connected to a box Structure. If the case is false, it does nothing, if it is true is short some simple IO DAQ within a while loop.

    To be sure that at the beginning of the vi the variable 'Execute DAQ' shared value false (no matter what 'State' the shared variable was left in front of the vi began) I write a Boolean constant to this shared variable 'Execute DAQ' out of hand while loop.

    Now my question: how is it possible that the case structure can enter into the 'True' State, even when main vi is not executed and there is therefore no way of the shared variable can be written in. I know that shared variables are stored in memory, but that's why I write it to false at the beginning of the vi.

    Even when I read the first shared variable before you change it with a constant False the second instance of the shared variable that is wired to the case structure bed to True.
    It seems to me that the shared variables do not follow the 'right' of the dependence of LabView and are updated outside the normal flow of the vi.

    Thanks for your time and advise on this.

    JackT wrote:

    Someone knows another way around this?

    Yes.  Do not use them.

    If you not post on a network, use a normal Global Variable or use a queue, the user event, stating to send commands indicating loops for updating their values.

    If on a network, then I recommend the network stream to send commands/data back with updates.  I used shared variables, more I hate them.

  • How to set the value of a variable in a cluster in LabVIEW to c#?

    Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW.  And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:

    lv.SetControlValue("clusterA.valueA",1);
    

    but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!

    Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:

    var clusterA is vi (Array). GetControlValue ("ClusterA");

    you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:

    clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}

    After that, simply to make the table in LabVIEW using:

    VI. SetControlValue ("ClusterA", clusterA);

    and now you see the LabVIEW, IntA is changed.

  • How to get the value of a variable to bind a client method of the AM?

    Hello

    I have a VO based on a variable binding. This binding variable is associated with an element on the page. When the user fills the element that the binding variable is written, the query is executed. This method works.
    What I want now is the following. With a second button, the user runs an exported AOS action method. In this method, I want to get the value of the binding variable that has been put forward.
    How would I do that?

    You can get the variables bind currently set on the object view as follows:
    catServiceDurationsVO has the reference to the VO
    VariableValueManager vm = null;
    VM = catServiceDurationsVO.ensureVariableManager ();
    System.out.println (VM.getVariableValue ("BindVariable"));

    Thank you
    Nini

  • How to change the value of a variable by comparison?

    Hello world

    I have 2 (x and y) local variables that are calculated according to a formula, then I mean if x > y then x = y. I want to know how to make x = y in labview

    Thank you

    Valdi,

    Why not try something like this:

    I used a local variable, but it replaces it with a property node when you put an excerpt of...

  • How to pass the value of the variable record type in the procedure

    Hai All

    My Question is

    I have a table named Emp and the structure

    ID Varchar2 (25)

    Name varchar2 (25)

    Number of salary


    And now, I created a folder named Rec_Emp

    Like this

    Type Rec_emp is made
    (Rec_Id varchar2 (25),)
    rec_name varchar2 (25).
    Number of Rec_salary);
    rec_emp emp_record;


    I created a SQL type

    Now how to pass the value type in the procedure


    Thanks and greetings
    SrikkanthM

    You are looking for something like this

    create table my_emp (id integer, name varchar2(100), sal number)
    /
    create type my_emp_obj as object(id integer, name varchar2(100), sal number)
    /
    create or replace procedure insert_into_my_emp(pEmp_Obj in my_emp_obj)
    as
    begin
      insert into my_emp (id, name, sal) values(pEmp_obj.id, pEmp_Obj.name, pEmp_obj.sal);
    end;
    /
    begin
      insert_into_my_emp(my_emp_obj(1,'karthick',1000));
    end;
    /
    select * from my_emp
    /
    
  • How to pass the value of the run-time file .sh by Oracle procedure

    I have a file test.sh that contain

    #1/bin/bash

    exp test/test@orcl file=/home/oracle/dump/test.dmp log=/home/oracle/dump/test.dmp grants = Y = index constraints Y = Y = (test) owner statistics = none

    Exit 0

    I craete a work called Create_job_proc in this work, I want to pass the value of job_action is the location of the file test.sh to

    /U01/home/Oracle/dump/test.sh and want to spend the test/test@orcl as a variable...

    Please suggest me... how to pass the value of Job_Action which will replace the .sh file content test/test@orcl to the value of the time of execution as scott/tiger@hr

    Thank you much Parth... It works perfectly...

    Thank you all for your help...

  • How to apply the filter to a specific column condition, but not to the report?

    Hello

    I'm having a problem in the application of a filter to one of the column condition.
    I have a scheme with the table around 10 dimension tables and a fact. My requirement is to provide a count on the table of facts with associated with some other columns in the dimension tables.

    Lets consider a scenario with tables as sales (Fact), region (Dimension), Year (Dimension), Type of sale (Dimension).

    Now my requirement is to highlight the fields

    City (Region) - city
    Year-
    Sales Count (dirty table) - number of all sales of the fact table
    Sales Count (dirty table) - count of all sales of the fact which type of sale table is 'Cash'

    Here, my question is how to apply the filter condition of Sales Type = 'MONEY in' only on one of the Sales Count column that comes from the fact table. I want to be ordered for the fourth column, the filter condition.

    Can someone let me know how?

    Thank you

    You must do this:

    1) click the button column fx sales. (This procedure does than on fact, not attributes.0

    2) click on the filter button.

    (3) select the size of sales from the left Type "selection list."

    (4) in the filter window, enter CASH, and click OK.

    This will create one filter on sales 'use' size 'type sales' as the filter. It willl filter only to this column.

  • How to apply the "Slate Pro Light" using CSS font?

    Hello

    Could you tell me how to apply the font of "Slate Pro Light" using CSS? I have not found a solution for the 'Light' slate Pro variation selection.

    Thank you.

    I usually use the definition of CSS of police-family at the following address on my html and body elements:

    font-family: "Slate Pro", Slate, "Myriad Pro", "BBAlpha Sans", Helvetica;
    

    Potentially adding "slate Pro Light" should do the trick. Alternatively, you could take advantage of the make-weight property when you need a lighter framework:

    font-weight: normal|bold|bolder|lighter|number|initial|inherit;
    

    In this case, lighter, might do the trick?

  • How to apply the strategy of UCS1.4 collection (1 d)

    Hi all

    I try to collect statistics on the performance of the network. but do not know how to apply the policy to the collection.

    Service profile, I cam see political Stats. But within the political framework of Stats, there are onlu available in config/choice is political threshold.

    Can someone help out me? Thank you very much!

    I think this is what you are looking for?

    UCS stores the past 5 statistics records at the "Reporting Interval" setting;
    There is no configuration to change that number.  You can put this interval out 8 hours but then you only get a snapshot every 8 hours. Trending or history retrieval would require an interval based extraction and storing application that utilizes the UCS XML API.

    This is a link to the UCS XML API information.
    http://www.cisco.com/en/US/docs/unified_computing/ucs/sw/api/ucs_api_book.html

  • How to apply the theme of Oracle Alta UI in ADF

    Hi all

    I use Jdeveloper 11.1.1.1.7.2 release1.

    Can anyone provide your inputs on how to apply the theme of Oracle Alta UI in the ADF.

    For any consultation on Alta IU @ http://www.oracle.com/webfolder/ux/middleware/alta/start-develop.html

    Thank you and best regards,

    Miko Auntie.

    http://www.Oracle.com/WebFolder/UX/middleware/Alta/start-develop.html

    http://www.Oracle.com/WebFolder/UX/middleware/Alta/patterns/PageDesign.html

    http://www.Oracle.com/WebFolder/UX/middleware/Alta/new-dev-w-Alta-skin.html

    Oracle ADF: Customized design

  • How to read the value of an independent textInput element inside the method?

    Hello

    I had a group of detail based on a readonly viewobject. I added an independent element textInput, you say, EndDate to this group that the user can enter a value inside. Now, when I run the app I select a row in the table and press a button that triggers a method inside a bean. My question is how I read the value in independent textInput (EndDate) within the method element?

    getTable () .getRowData () does not print the unbound attribute. It seems that it only contains attributes underlying viewobject

    I use JDev 11.1.1.4

    Kind regards
    Will do

    Will do,

    You can better create a transitional attribute for that in your view object, so you can use a regular expression #{row.bindings...} to get the value.

    Steven Davelaar,
    JHeadstart team.

Maybe you are looking for