How can i pass function return values in to varray

Hi
create procedure name(parameters list)
here ---i am calling a function
varname := function name
returns 4 values
My doudt is how can i pass these return values in to varray..
Type varray vname[5] date type
Begin
statements
end prodedure name;
pls clarify me its urgent

This may give u a start
sql>
create or replace package test_array_pack as
type ar1 is varray(10) of number;
end;
Package created.
sql>
create or replace function test_array return test_array_pack.ar1 is
  v_ar1 test_array_pack.ar1;
begin
v_ar1 := test_array_pack.ar1(1,2,3,4);
return v_ar1;
end;
Function created.
sql>
declare
v_ar2 test_array_pack.ar1;
begin
v_ar2 := test_array;
end;
PL/SQL procedure successfully completed
Message was edited by:
        jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE

    HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE.
    DATA : BEGIN OF ITAB OCCURS 0,
               FIELD1(2) TYPC C DEFAULT   '12',
               FIELD2     TYPE C ,
               END OF ITAB1.
    IT'S GIVING ERROR MESSAGE.
    PLZ LOOK INTO THIS AND GIVE ME CORRECT SOLUTION.
    THANKS
    SURI

    DATA : BEGIN OF ITAB OCCURS 0,
    FIELD1(2) TYPC C,
    FIELD2 TYPE C ,
    END OF ITAB1.
    itab-field1 = '12'.
    itab-field2 = 'A'.
    append itab.
    clear itab-field2.
    itab-field1 = '12'.
    itab-field2 = 'B'.
    append itab.
    clear itab-field2.
    Now everytime u'll have the value for field1 = '12'.
    Regards
    Vasu

  • How can I make Function return varchar2 more than 4000

    I have a function
    FUNCTION testing (v_pk_application in number, v_inccharges in char)
    return varchar2(30000)
    --return number
    is
    v_net_sum varchar2(30000);
    v_net_sum2 varchar2(30000);
    v_datarow varchar2(3000);
    v_datarow2 varchar2(3000);
    begin
    return v_net_sum;
    end;
    I want to return varchar2 more than 4000, how can I do that.
    Thanks

    user10659388 wrote:
    I want to return varchar2 more than 4000, how can I do that.A function can return a string up to the maximum allowed for varchar2.
    Varchar2 can be up to 32767 characters...
    SQL> create or replace function ret_str return varchar2 is
      2    v_str varchar2(32767);
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6  end;
      7  /
    Function created.
    SQL> declare
      2    v_retstr varchar2(32767);
      3  begin
      4    v_retstr := ret_str();
      5  end;
      6  /
    PL/SQL procedure successfully completed.However, SQL only supports varchar2 up to 4000 characters so the same function will cause SQL to error, even though the function is perfectly valid.
    SQL> select ret_str() from dual;
    select ret_str() from dual
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SCOTT.RET_STR", line 5
    SQL>So, if you intend to use the function only in PL/SQL then you can use varchar2 up to 32767 characters, but if you intend to use it in SQL then you will be limited to returning 4000 characters. Alternatively you can return a CLOB which SQL supports but they are a little more tricky to work with than varchar2...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function ret_str return clob is
      2    v_str clob;
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6* end;
    SQL> /
    Function created.
    SQL> select ret_str() from dual;
    RET_STR()
    SQL>

  • How can i pass the one value for two bind parameters

    hi All,
    i have a search Query
    select Distinct CONSOLIDATION_SUMMARY_ID,CREATION_DATE,CREATED_BY,BATCH_ID,PROCESS_FLAG,ERROR_MESSAGE,CUSTOMER_ID,BILLING_FREQUENCY
    ,CONSOLIDATION_LEVEL,SOLD_TO_ORG_ID ,SHIP_TO_ORG_ID ,TRANSACTIONAL_CURR_CODE ,INVOICE_TO_ORG_ID ,PRICE_LIST_ID
    ,ORIG_SYS_DOCUMENT_REF,INVENTORY_ITEM_ID ,ORGANIZATION_ID ,ORDERED_ITEM ,ORDERED_QUANTITY ,UNIT_LIST_PRICE
    ,UNIT_SEELING_PRICE,ORDER_QUANTITY_UOM,ORDER_NUMBER ,ORDER_DATE ,INVOICE_NUMBER ,INVOICE_DATE
    ,FEE_CALCULATION_WORKSHEET_PDF ,TRADE_DETAILS_PDF ,INVOICE_REPORT_PDF ,PRICING_ATTRIBUTE_CONTEXT
    ,PRICING_ATTRIBUTE ,PRICING_ATTR_VALUE_FROM
    from xxcurrnx.xxcur_trade_consol_summary XXSTR
    WHERE XXSTR.BATCH_ID=NVL(:1,XXSTR.BATCH_ID)
    and XXSTR.CUSTOMER_ID=nvl(:2,XXSTR.CUSTOMER_ID)
    But i need to pass only one value to this query: throw the below code
    public void passTocusttrxn(String vcustid)
    System.out.println("The customer id in trxn vo:"+vcustid);
    XxcurtradeconsummaryVOImpl vOrdnumb=getXxcurtradeconsummaryVO1();
    vOrdnumb.setWhereClauseParam(0,vcustid);
    vOrdnumb.setWhereClauseParam(1,null);
    vOrdnumb.executeQuery();
    System.out.println("The executed query After is :"+vOrdnumb.getQuery());
    But it throws the below exception.
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could you please tell me how can i achieve this.
    Thanks,

    hi Meher,
    i need to pass this value throug the Spell Parameter.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("PCustID")!=null) // PCustID is the Spell parameter here
    if(pageContext.getParameter("PbtchID")!=null)
    if(pageContext.getParameter("PordNum")!=null)
    String vcustID=pageContext.getParameter("PCustID");
    String vOrdNum=pageContext.getParameter("PordNum");
    System.out.println("The cust id in PR:"+vcustID);
    System.out.println("The cust id in PR:"+vOrdNum);
    am.passTocustlinetrxn(vcustID);
    how this vcustID value will passed to the search Code.
    if(pageContext.getParameter("BatchID")!=null && !pageContext.getParameter("BatchID").equals(""))
    String BchID=pageContext.getParameter("BatchID");
    int vInBtchID=Integer.parseInt(BchID);
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(0,vInBtchID);
    System.out.println("The Batch ID is :"+vInBtchID);
    f=1;
    }else
    srchVO.setWhereClauseParam(0,null);
    if(pageContext.getParameter("CustmeCode")!=null && !pageContext.getParameter("CustmeCode").equals(""))
    System.out.println("i am im customer code ");
    String vCustID=pageContext.getParameter("CustmeCode");
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(1,vCustID);
    System.out.println("The customer code is "+vCustID);
    f=1;
    }else
    srchVO.setWhereClauseParam(1,null);
    if(f==1)
    srchVO.executeQuery();
    Regards,

  • How can I pass a variable  value from first jsp page to thired jsp page

    In my program ,threr are three jsp pages . I want the first pages's variable value in to thired page .How can I acess.
    I used the request.getparameter() ,but when I print the value , null value is getting .

    request parameters only last for one request.
    To save them longer than that you need to save them somewhere.
    Couple of alternatives
    1 - store them to session
    session.setAttribute("username", request.getParameter("username");
    2 - create a hidden field on page 2 and store the value from page 1 there. When you submit page2, you can get it on page3 with request.getParameter again.
    <input type="hidden" name="username" value="<%= request.getParameter("username") %>">

  • How can I pass in continuous value from labview to teststand?

    Hello
    I want to run a vi using teststand. I want this vi to send values to teststand. My problem is that the value is only updated at the end of the vi execution and I want to get the value before the end of the vi execution. If somebody can help me ...
    Thanks
    Corentine 

    Corentine,
    you can think of TestStand calls to LabVIEW-VIs just like functioncalls in C/C++. The main continues running only if the subroutine is fully executed. Furthermore, LV returns values to the parameters (connector block) only at the end of the execution of the VI.
    So you cannot use "simple VI calls" in your sequence if you need datatransfer during execution from steps. If you like to do something like this, the easiest way would be to create a VI which runs continuously in the background and supplies data via mechanisms like Queues (if executed in the same instance) or TCP/IP. In the stepmodules you can retrieve the data when needed.
    hope this helps,
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to return 2 value to a method and how can i get the return value?

    hi guys, this is my problem.
    private void one(){
    two();
    private Vector, Vector two(){
    return(row, column);
    the problem is that I don't know how to call the two() method and return from two() to one().
    please help me, i'm very new to programming........
    liml

    the problem is that I don't know how to call the two()
    method and return from two() to one()You can doprivate Vector[] two () {
        return new Vector[] {
            row,
            column
    } // as suggested
    private void one () {
        Vector[] rowAndColumn = two ();
        Vector row = rowAndColumn[0];
        Vector column = rowAndColumn[1];
    }You should consider replacing your Vector with an ArrayList, btw.
    Kind regards,
      Levi

  • How can I pass a filter value to another report?

    I'm using a filter within a formula of a field. For example: (FILTER("Facts - Actuals Ledger"."Actual" USING ("Time"."Fiscal Quarter" = '2012 Q 2'))-FILTER("Facts - Actuals Ledger"."Actual" USING ("Time"."Fiscal Quarter" = '2012 Q 1')))*-1
    What the above is doing is calculating the variance between Q1 and Q2. My issue is when I drill on this value to a more detailed report, it's combining the Q1 and Q2 values, instead of showing the difference. I'm trying to avoid having to hard code the drill report and was wondering if there's any way to pass the calculated FILTER to the other report?
    Thanks.

    Hi,
    I presume that you want to show the the difference between a prompted quarter and its previous quarter?
    If so, I would use the Ago Time Series Function to create a new logical measure for prior quarter e.g.
    ago("Facts - Actuals Ledger"."Actual", "Time"."Quarter", 1)
    Note that the function should contain the time dimension level for quarter. The 1 at the end is the offset e.g. 1 quarter ago. This measure will now return the prior quarter value for whatever quarter is prompted.
    Create a prompt for your report for Fiiscal Quarter, and set a filter in the report for the same column with an operator of Is Prompted.
    Add the base measure ("Facts - Actuals Ledger"."Actual") and your new Ago measure to the report. When you prompt the report with a quarter, these two columns will show the Actual amount for the promted quarter and the previous quarter respectively. Now all you need to do is subtract one from the other.
    Now, when you drill to another report, the filter value of the prompted quarter will be passed across. Apply the same logic to define measures in the drill report, receiving the prompted quarter only.
    Note that you can also use Time Series Functions in the column formula when creating the analysis.
    Please mark if helpful / correct,
    Andy
    www.project.eu.com

  • How can I pass a var value between MovieClips?

    New week, new question.
    I haven't been able to find the answer to this: I'm working with a var defined in the main timeline var score:int; , wich I use in 10 different movie clips using var score = MovieClip(this.root).score;
    Everything works perfect on the first MovieClip, but when the next one plays score does not keep the value assigned in the previous MovieClip therefore the score is lost.
    The clips are questions and they are place on the main time line in different frames and main time line actions layer which only contains this:
    stop();
    var score:int;
    nextQuestion.addEventListener(MouseEvent.CLICK, newQuestion);
    function newQuestion(evt:MouseEvent):void {
        nextFrame();
    covers each frame with every different MovieClip.
    What I need to know is how to make that value pass to the next Movie Clip?

    Hi Ned,
    I had defined the score var in the time line but to add the score from each question (MovieClips) I have to call it to the each MovieClip and I assume that whe I call the score var in the second MovieClip will keep the score from the first, but is not the case:
    This is the time line actions layer:
    stop();
    var score:int;
    nextQuestion.addEventListener(MouseEvent.CLICK, newQuestion);
    function newQuestion(evt:MouseEvent):void {
        nextFrame();
    and this is the code from the first question (MovieClip)(all the questions will have the same code except for some specific things like the value that each answer adds to the score and stuff like that)
    stop();
    var score = MovieClip(this.root).score;
    var answersArray:Array = new Array();
    var strikeCount:int;
    var sucessCount:int;
    var messageBox:TextField = new TextField();
    messageBox.text = "" + score;
    addChild(messageBox);
    messageBox.textColor = 0xFF0000;
    messageBox.width = 200;
    messageBox.height =100;
    messageBox.x = 285.5;
    messageBox.y = -32.9;
    this.strikeOne.visible = false;
    this.strikeTwo.visible = false;
    this.strikeThree.visible = false;
    this.flipQ1One.visible = false;
    this.flipQ1Two.visible = false;
    this.flipQ1Three.visible = false;
    this.flipQ1Four.visible = false;
    function answListener(evt_obj:Event){
    if((strikeCount >=3) || (sucessCount ==4)) { nextFrame();
    }else if (answersArray.indexOf(answ_input.text) < 0){
        if(answ_input.text == "5"){
        score = score + 61;
        messageBox.text = ""+ score;
        this.flipQ1One.visible = true, flipQ1One.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "3"){
        score = score + 25;
        messageBox.text = ""+ score;
        this.flipQ1Two.visible = true, flipQ1Two.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "4"){
        score = score + 8;
        messageBox.text = ""+ score;
        this.flipQ1Three.visible = true, flipQ1Three.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "2"){
        score = score + 3;
        messageBox.text = ""+ score;
        this.flipQ1Four.visible = true, flipQ1Four.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else {answ_input.text = "";
              strikeCount = strikeCount + 1;}
    answ_input.addEventListener("enter", answListener);
    function strikesListener (evt_obj:Event) {
            if ((strikeCount == 1) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeOne.visible = true;
            else if ((strikeCount == 2) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeTwo.visible = true;
            else if ((strikeCount == 3) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeThree.visible = true;
            else {}
    answ_input.addEventListener("enter", strikesListener)

  • How can I pass Flex Field value to the Call Wrap Up screen?

    Hello helpers,
    I am trying to get a value from the 'Flex Field' passed over to the 'Call Wrap Up' screen by using Form Personalization.
    Oracle was configured by a subcontractor and therefore I do not know what the exact name of the textfield is in the Flex Field however the label is 'Method of Contact'. When i set 'Show Custom Events' to 'On', I get the response: 'CSXXXRC.INCIDENT_TRACKING.STATUS_CODE:WHEN-NEW-ITEM-INSTANCE' When i enter a value in the Method of Contact field in the Flex Field.
    Can anyone help?
    I am a complete Newbie to Oracle.... I only know a bit about Oracle Form Personalization.
    Any help would be much appreciated,
    S

    Seems like you're talking about a from from the eBusiness-suite. There are special rules for that, ask your question in the eBusiness-suite-forum OA Framework

  • How can I pass URL parameter value to text field?

    Dear Masters,
    I have a text field. I want it to have a value based on the URL parameter, for example:
    http://myapplication.net:7777/pls/apex/f?p=102:1:::::P1_RTNUM:9448,P1_EMAILADD:email.add.here
    I want the value of the text field = P1_EMAILADD after the form was loaded. Also, please have it read-only.
    Thanks a lot.
    Edited by: user6368519 on Sep 16, 2009 11:39 PM

    Thanks Saad,
    Can I email you(I would need your email) for any concerns or just create a new thread for you to look?
    This is ok now. I'm sorry but I just marked this one as an "answered" one last time.
    Thanks for all the help again I appreciate it. ;)
    Thanks,
    Aaron
    [email protected]

  • How can i pass second text  value to the procedure.

    Hi ,
    I have used APEX_ITEM.TEXT(1,null) Item_name,APEX_ITEM.TEXT(2,null) file_name in a sql query and i should pass these two text value as a input parameter to the Procedure.
    So in Process i have written code like
    FOR i IN 1 .. APEX_Application.g_f01.COUNT
    LOOP
    generate_report_data(APEX_Application.g_f01(i)
    ,APEX_Application.g_f02(i)
    END LOOP;
    COMMIT;
    if i enter values in two text columns then two values are passing to a procedure it's fine.
    Here the issue is if i leave the first value as balnk and enter the 2 nd value like Xyz then click on a submit button
    so 2 nd value also passing null to the procedure..
    please anybody guide on this issue..
    Thanks in advance..
    Regards
    Narender B

    Hello Narender,
    >
    Here the issue is if i leave the first value as balnk and enter the 2 nd value like Xyz then click on a submit button
    so 2 nd value also passing null to the procedure..
    >
    This is happening because of FOR i IN 1 .. APEX_Application.g_f01.COUNT in your procedure:
    >
    FOR i IN 1 .. APEX_Application.g_f01.COUNT
    LOOP
    generate_report_data(APEX_Application.g_f01(i)
    ,APEX_Application.g_f02(i)
    END LOOP;
    COMMIT;
    >
    FOR i IN 1 .. APEX_Application.g_f01.COUNT this loop will take only those values of apex_application.g_f01 into consideration whose value is not null.
    Hope it helps!
    Regards,
    Kiran

  • How can I pass a custom value to the ecommerce invoice?

    I would like to pass a barcode or an image to the ecommerce invoice once they buy my product. The idea is that they would print the email or pdf attached to it and reclaim their products on my physical store in case shipping is not allowed for their area. Is this possible?.

    Hey Klaye,
    I'm not sure if that php generator would work on the CRM because from what I understand it only uses javascript. I found these websites that might interest you:
    http://parall.ax/products/jspdf (a javascript pdf generator)
    http://www.atlantawebdesignga.com/adobe-business-catalyst-developer/how_to_get_business_ca talyst_e-commerce_to_do_the_impossible (an ecommerce "hack")
    My plan was combining both methods plus a jquery barcode generator to insert the pdf in the ecommerce invoice, but your method seems better. Have you tested it? Does it work with the {tag_invoicenumber}?.
    I haven't had the time to work on this because I'm working for some clients right now. But if I do get something to work I'll post it here. Hope that helped.

  • How can I pass empty value in URL Parameter

    Hi,
    I am passing different URL parameters to one page, to filter
    the recordset on that page. How can I pass an empty value in the
    URL parameter so that the recordset in unfiltered?
    The URL parameter is based on one field of the database:
    ContentType. So, the link would be to
    default.asp?ContentType=Event
    and then all records that have the ContentType field in the
    DB as Event are displayed. Is it possible to use this system to
    pass an empty parameter so that all records are displayed?
    Thanks
    Ian

    ?ContentType=All
    <% if (ContentType == "All")
    Build recordset w/o filtering
    ASP is rusty, but those are the basics.
    "iandobie" <[email protected]> wrote in
    message
    news:e8im80$q7m$[email protected]..
    > Hi,
    > I am passing different URL parameters to one page, to
    filter the recordset
    > on
    > that page. How can I pass an empty value in the URL
    parameter so that the
    > recordset in unfiltered?
    > The URL parameter is based on one field of the database:
    ContentType. So,
    > the
    > link would be to
    > default.asp?ContentType=Event
    > and then all records that have the ContentType field in
    the DB as Event
    > are
    > displayed. Is it possible to use this system to pass an
    empty parameter so
    > that
    > all records are displayed?
    > Thanks
    > Ian
    >

Maybe you are looking for

  • Change the display of the multiple Table items using a single Drop-down

    I have created a Web Template in BEx WAD (BW 3.5) with 4 Tables assigned to 4 dfferent Queries. Now I want to change the display of the all the Four Tables based on the selection of display properties chosen in a single Dropdown item. The properties

  • In vl10d the error is delivery is open

    Hi guru's Can anybody guide while creating a delivery through vl10d, the error is see log for creating deliveries, while entering the log there are total 4 errors one for 0 material available, another is the sum of the confirmed quantity exceeds the

  • Problem in updating HRP1001

    Hi Experts, I am using RH_INSERT_INFTY for modifying a position (1001) I am able to add all other relationships. But Relation A 012 is not getting added. Is there any difference for relation A 012? Also one thing I observed with A 012 is that,  for a

  • Could not load Desktop & Screen Saver

    I got this error message when opening Sys Pref / Desktop Screen Saver, "Could not load Desktop & Screen Saver preference pane." Just loaded  Yosemite on iMac 10.1. Any suggestions? Thanks

  • Unable to Open PSE12

    I had purchased PSE12 in 2013 and was happily using it. Over the last few days, when I am trying to open PSE12, Adobe Download assistant opens and asks me to sign in to download the trial software. Image given below I have a valid product key and thi