Impossible to retrieve the return value of function from pl/sql using the DB adapter

Dear Experts,

I use the DB adapter in my BPEL process. Using the DB adapter I invoke a PL / SQL function. I am able to send two input parameters for the pl/sql function. But I do not know how to retrieve the return value of the function. Please suggest me.

Thank you
Rajesh

Can you tell how pl/sql function looks like you? you return the value of the function, right?

Tags: Fusion Middleware

Similar Questions

  • How to the return type of function from PL/SQL

    Hello

    I need to create a function that returns a list of ID, which is stored in a type T_IDs, something like:

    search function (searchstring in varchar2) return to T_IDs

    I have a little problem with the type within the body of the function using a select statement and filling

    Select the id of the table where the text as searchstring.

    which is to select a list of IDS corresponding to the where clause. Is it possible to use select in or should I go for another mechanism?

    Thanks for all the ideas.

    Bulk Collect works for me...

    SQL> create type t_ids as table of number;
      2  /
    
    Type created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace function get_ids(deptno in number) return t_ids is
      2    ids t_ids;
      3  begin
      4    select empno
      5    bulk collect into ids
      6    from   emp
      7    where  deptno = get_ids.deptno;
      8    return ids;
      9* end;
    SQL> /
    
    Function created.
    
    SQL> select * from table(get_ids(10));
    
    COLUMN_VALUE
    ------------
            7782
            7839
            7934
    

    However, I would rarely use such a data collection, as it fills with PGA in memory and passing a lot of data between SQL and PL/SQL. I must have a just cause and justified in wanting to do things this way.

  • SQL (body of function from PL/SQL returning the SQL) query when you use to_char

    We are trying to build a page of Type SQL Query report (body of function from PL/SQL returning SQL query).
    our request is simple, to extract the month of the column recording_date.

    declare
    l_query varchar2 (1000);
    Start
    l_query: = 'select to_char (recording_date, 'MM') of re_productive;
    Return l_query;
    end;

    but we would like the following for this query problem

    Function returning SQL query: query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the box of generic columns below the source of the region without analysis.
    (ORA-06550: line 4, column 42: PLS-00103: encountered the symbol "MY" what awaits one of the following values:.) (* @ % & = - +; <>/ at is mod remains not rem <>or! = or ~ = > = < = <>and or as between | multiset Member SUBMULTISET_ the symbol ".") was inserted before 'MY' to continue.)

    Notes:
    1 - the request is correct and it has been tested under sqlplus and toad.
    2. we tried option use generic name (analysis of query runtime only) column, but we get the same problem.


    any quick help please.

    Hello

    You have not escaped your quote in the string. Try this...

    DECLARE
    l_query VARCHAR2(32767);
    
    BEGIN
    
    l_query:= 'select to_char(recording_date,''MM'') from re_productive';
    
    RETURN l_query;
    
    END;
    

    See you soon

    Ben

  • Export as .xls. Classic report type: SQL (body of function from PL/SQL returning the SQL) query

    Hey guys,.

    I'm using version 4.2.6 apex. The theme is 26.

    IM also using Listener Oracle APEX.

    I can print my classic report in PDF or CSV format.

    But I need to export it as a .xls extension.

    Report type: SQL (body of function from PL/SQL returning the SQL) query

    I need is like this cause my 'where' clause type is dynamic.

    Look at using this method: Tom's Blog: a non-standard export excel 2010 (.xlsx)

    I do something similar for downloads to excel in my projects...

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • Problem of return values of functions

    Flash MX2004
    I am trying to create a game similar to Lingo, if you've never seen on TV. I had a bit of code that was working until I decided to divide it functions... specifically I try return values of 2 functions, and I get nothing back. When I track it comes back undefined. Can we have a look at this code to see if there is something really wrong with her?

    Any help is greatly appreciated!

    ScottieBitter

    Rothrock, Craig,

    Thank you both for your help. I applied your suggestions and now my tracks are back with the results that I expect!
    Awesome!

    Now to continue to work on this stuff... it's an assignment for a class account tomorrow and I have a long way to go...

    ScottieBitter

  • Impossible to retrieve the password for the user FUSION_APPS_WSM_APPID using ldapsearch

    Dear all,

    I'm unable to retrieve the password for the user FUSION_APPS_WSM_APPID using the ldapsearch command

    Is the correct command extract the password for the user FUSION_APPS_WSM_APPID below?

    $ORACLE_HOME/bin/ldapsearch - h < hostname > Pei 3060 d 'cn = sleep '' w < password > base b s 'orclCSFKey = basic.credentials, cn = oracle.wsm.security, cn = CredentialStore, cn is FusionDomain, cn = JPSContext, cn is FAPolicies' objectclass = * orclcsfname orclcsfpassword

    Kindly help me in this problem.

    Kind regards

    Vinayak K

    Can you clarify why you need recover the password? Application identities are designed for internal processing and never to be exposed outdoors or used for other purposes only lift access to the code in some scenarios within the system. So only the administrator must have access to the account and the password of access they would reset it in the store of credentials if necessary. That said I think that the admin can retrieve the password using the command listCred wlst something like:

    listCred(map="oracle.wsm.security",key="FUSION_APPS_WSM_APPID-KEY")

    --

    Jani Rautiainen

    Relationship with the developers of Applications in fusion

    https://blogs.Oracle.com/fadevrel/

  • How can I get a value from a function from pl/sql by OADBTransaction

    Hi all
    Hope you will be fine.
    as we know, we can get a sequence by this code value:
    Super.Create (AttributeList);
    Transaction OADBTransaction = getOADBTransaction();

    Vendor ID is obtained from the table sequence
    Number supplierId = transaction.getSequenceValue ("FWK_TBX_SUPPLIERS_S");

    My question is how can I get a value in a variable to a pl/sql function:
    the function is defined as follows:
    ******
    create or replace function getNextTrans return varchar2
    is
    Team varchar2 (20);
    Start
    SELECT "CASH". TO_CHAR (SYSDATE, 'DDMMYYYY') | GP_CASH_TRX_SEQ. NEXTVAL FROM DUAL;
    return team;
    end;
    /

    Hey Dina,

    Reference http://www.oraclearea51.com/oracle-technical-articles/oa-framework/229-calling-database-procedures-and-function-from-oaf.html

    Kind regards
    GYAN

  • Authorisation scheme: poll from function from PL/SQL Boolean value

    Hello
    I use with authorisation schemes on page 2 as function of PL/SQL to return a Boolean.

    The value of P1_PREF is from page1 (search) report box, driven model type (< class td = "t12data" >#PREF # < table >)

    --(lien hypertexte pref) to page 2 P2_PREF.

    I tried passing the value (: P2_PREF or: P1_PREF) but it does not work. If I assign (where pref = "100") or any other value it works fine.
    Is it to do with sessions or to store the value in a variable prior to authorization of the page. Please notify.

    DECLARE
    v_userrole VARCHAR2 (400) DEFAULT NULL;
    v_staffaccess VARCHAR2 (400) DEFAULT NULL;
    BEGIN

    Select USER_ROLE IN v_userrole
    to userrole
    where (upper (USER_LOGIN) = upper(:APP_USER)
    or (upper (:APP_USER)) = 'TEST');

    Select staff_access in the v_staffaccess of sm
    where pref = "P2_PREF";

    IF INSTR (v_userrole, 'A') > 0
    THEN
    RETURN TRUE;
    END IF;

    IF (((v_userrole) = "SP" OR (v_userrole) = 'U') and nvl (upper (v_staffaccess), 'x') do not ("SUPER %')) THEN)
    RETURN TRUE;
    ELSE RETURN FALSE;
    END IF;

    END;

    Please advise on the passage of the value.
    Thank you very much
    Harinder

    Hi Harinder

    There are many ways this can be achieved. It seems to me that your problem is that the value passed to page 2 is not be updated at each visit?

    So how about this (as only one way to do it).

    Page 1 to P1_PREF
    You press a button or link to go to page 2, that SUPPORTS THE PAGE (important)
    You have a hidden item P2_PREF on page2, who has...

    Source used - always replace any existing value in session state
    Source - point Type

    And then refer to P1_PREF.

    Or you can create a calculation that sets the value of P2_PREF to the value of P2_PREF on the laundry front header.

    Or your button on page 1 could create a branch to page 2 using "defined these elements" "with these values" options in the industry...

    See you soon

    Ben

  • Offshoot of page based on the return value of function

    I have a combo box (P2008_SUPPORTING_MATERIALS) with 'Yes' and 'No' values.

    I need a button that will save the selected value, and then create a branch to the 1092 page if it of 'Yes' or branch to page 2094 if it is 'no '.

    That's what I did:

    1 create a SAVE button
    2. created a page process of type PL/SQL with function (see code below) inside (PageBranchDecision). The conditional processing I put him "when press button" for the "SAVE" button.
    3. create a branch of the page with a branch type of DIRECTION to the FUNCTION RETURN A PAGE. For the action of the branch, I put the name of the procedure on the page (PageBranchDecision). Because these are conditions, I defined him "when press button" on the "SAVE" button.

    This is the code for the page process:

    DECLARE
    whole n_page_id;
    v_sup VARCHAR2 (3);

    BEGIN
    v_sup: =: P2008_SUPPORTING_MATERIALS;

    IF v_sup = "Yes".
    THEN
    SELECT 1092 INTO double n_page_id;
    RETURN n_page_id;
    ON THE OTHER
    SELECT 2049 INTO double n_page_id;
    RETURN n_page_id;
    END if;

    END;

    Now, that's the problem... According to the 'Oracle HTML DB manual"page 294 books and ' easy Oracle HTML-DB' page 307, with the type of the branch of 'Branch to function returning a Page', a function PL/SQL is written which returns a digital page at junction id. In my code, it would be 'n_page_id '. But, when I run my page and click on my "SAVE" button I gives me an error that a RETURN statement cannot contain an expression.

    I don't know why I get this error. I need to get the value of the page to the branch based on the 'yes' or 'no '.

    Someone has an idea what I am doing wrong? My situation seems, as it is possible through the logic, I'm following?

    Thanks in advance,
    Maggie

    ch - ensure that any unconditional branch on the page has a largest number in sequence to ensure that this branch is triggered and ensure that there is no other branch that is triggered by the "SAVE" button

  • Impossible to retrieve the serial number (no invoice number of digital river useless for the adobe customer service) - how can this be resolved

    I bought PS CS5 of adobe business store 3 years ago - the serial number does not show under my account

    Contact customer via chat and they can't help me because the invoice from the adobe site is provided by digital river and they are unable to track the purchase - they need to order number that is not on the invoice

    I don't understand how adobe can not keep a purchase according to the invoice is provided on their own Web site

    The site gave me a hotline number that has a message recorded for products CS saying Adobe does not offer telephone support for products cs - go to site

    A bit frustrating - the reception in Sydney adobe phone number even goes to a messaging speech just as the number of licenses in volume on the invoice

    Anyone at adobe can really help? -even find one at the end of a phone would be a good thing.

    Thanks in advance

    Simon

    Hi Simon

    Volume licensing and their serial numbers can be retrieved from the Web Site licenses (LWS) - see site licenses Adobe | Serial numbers | Orders | Accounts

    Thank you

    Bev

  • Irregular data loss - function from PL/SQL returning data using Ref Cursor

    Database Version: 10.2.0.4.0 (node 2 CARS)

    The high-level process flow is as below:
    (1) insert records in a few tables & commit the same
    (2) call the pl/sql function to extract files (on certain conditions with joins with other tables) of the tables which are filled in step 1.
    -> It uses the ORDER BY clause to queries inline & line number 5000 records return for each call.
    Sense - if inline query is supposed to return 1,00,000 records then 20 calls to the same function. This, because the application cannot contain records beyond number.
    (3) the data returned by the ref cursor is then processed by application (Tibco BW) to generate the flat file.

    We are facing the problem of data loss in the file and there is no fixed model. It happens once between 200-300 calls process.
    Resolution: When the problem occurs, triggering the process and in almost every time re-outbreak of the process provides required data.

    Guidance on what could be the reason?

    * Examples of Code for the function:
    CREATE OR REPLACE FUNCTION FUNC_GET_HRCH_TOTAL_DATA)
    outinstrid in NUMBERS
    outinstrkey in NUMBERS
    rownumberstart in NUMBERS
    rownumbereend in NUMBERS
    err_code OUT VARCHAR2,
    err_msg OUT VARCHAR2)
    RETURN PACK_TYPES. HRCH_TOTAL_CURSOR
    IS
    REF_HRCH_TOTAL_CURSOR PACK_TYPES. HRCH_TOTAL_CURSOR;
    BEGIN

    OPEN FOR REF_HRCH_TOTAL_CURSOR
    SELECT *.
    FROM (SELECT A.HIERARCHY_KEY, B.KEY, B.VAL_KEY, A.KEY_NEW, C.ITEMID, B.VAL_TAG, B.sort_order, ROWNUM ROWNUMBER
    OF AOD_HRCH_ITEM A, AOD_HRCH_ATTR B, AOD_HRCH_ITEMS C
    WHERE A.outputid = B.outputid
    AND A.outputid = C.outputid AND A.outputkey = B.outputkey
    AND A.outputkey = C.outputkey AND A.outputid = outinstrid
    AND A.outputkey = outinstrkey AND A.ITEM_SEQ = B.ITEM_SEQ
    AND A.ITEM_SEQ = C.ITEM_SEQ AND A.HIERARCHY_LEVEL_ORDER = B.SORT_ORDER
    ORDER BY A.HIERARCHY_LEVEL_ORDER DESC)
    WHERE ROWNUMBER < rownumbereend
    AND ROWNUMBER > = rownumberstart;


    RETURN REF_HRCH_TOTAL_CURSOR;
    EXCEPTION
    WHILE OTHERS
    THEN
    err_code: = x_progress | ' - ' || SQLCODE;
    err_msg: = SUBSTR (SQLERRM, 1, 500);

    END FUNC_GET_HRCH_TOTAL_DATA;
    /

    Published by: meet_sanc on February 16, 2013 10:42

    Your SELECT statement is almost certainly incorrect

    SELECT *
      FROM ( SELECT A.HIERARCHY_KEY, B.KEY, B.VAL_KEY, A.KEY_NEW, C.ITEMID, B.VAL_TAG, B.sort_order,ROWNUM ROWNUMBER
               FROM AOD_HRCH_ITEM A, AOD_HRCH_ATTR B, AOD_HRCH_ITEMS C
              WHERE A.outputid = B.outputid
                AND A.outputid = C.outputid AND A.outputkey = B.outputkey
                AND A.outputkey = C.outputkey AND A.outputid = outinstrid
                AND A.outputkey = outinstrkey AND A.ITEM_SEQ = B.ITEM_SEQ
                AND A.ITEM_SEQ = C.ITEM_SEQ AND A.HIERARCHY_LEVEL_ORDER = B.SORT_ORDER
              ORDER BY A.HIERARCHY_LEVEL_ORDER DESC)
     WHERE ROWNUMBER < rownumbereend
       AND ROWNUMBER >= rownumberstart;
    

    Since the ORDER BY is applied after the ROWNUM is assigned in this case, your query is requested for a period of 5000 lines any arbitrariness. It would be perfectly valid for a single line to return in each of your 200 different calls or for a line to return in any of them.

    You definitely want to do something in the sense of the canonical askTom wire

    select *
      from ( select a.*, rownum rnum
               from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
              where rownum <= MAX_ROWS )
     where rnum >= MIN_ROWS
    

    That said, it seems inconceivable that Tibco is unable to manage a cursor that returns more than a certain number of lines. You do a ton of work to return the data pages that are certainly not necessary. Unless you're saying that you somehow paralyzed your installation of Tibco giving him a ridiculously small amount of memory to process, something doesn't look good. A slider is just a pointer - it holds that no data - so the number of lines that you can extract a slider should have no impact on the amount of memory on the client application needs.

    As others have already pointed out, your exception handler is almost certainly do more harm than good. Return the error codes and error messages as from the OUT parameters, instead of simply allowing the exception to propagate deletes a ton of useful information (such as the mistake of the stack) and makes your process much less robust.

    Justin

  • Body of function from PL/SQL query SQL - problem with where Cluase return

    Hi all
    I have problem with sub PL/SQL. Where clause does not filter the values even when I change the value: P7_INVESTIGATOR. I have marked with an asterisk for where clause where I want the values to filtered.


    DECLARE
    v_sql varchar2 (5000);
    v_inv VARCHAR2 (100);

    Start
    v_inv: = UPPER(:P7_INVESTIGATOR);

    v_sql: = ' select TBLCASES. INVESTIGATOR as an INVESTIGATOR,';
    v_sql: = v_sql | "TBLCASES. CASENUMBER as CASENUMBER,';
    v_sql: = v_sql | "TBLCASES. OPENDATE as OPENDATE,';
    v_sql: = v_sql | "TBLCASES. ESTCOMPLETE as DATE_CIBLE,';
    v_sql: = v_sql | "TBLCASES. STATUS of STATUS ';
    v_sql: = v_sql | "TBLCASES. Case CODE case CODE as,';
    v_sql: = V_sql | "TBLCASES. FAIR_HOTLINE as FAIRHotline,';
    v_sql: = v_sql | "TBLCASES. NYSIG as NYSIGCase,';
    v_sql: = v_sql | "TBLCASES. The REGION';
    v_sql: = v_sql | "TBLCASES. PROGAREA as PROGArea ';
    v_sql: = v_sql | ' from TBLCASES where 1 = 1';
    **************************************************************
    If v_inv <>null then
    v_sql
    : = v_sql | "and UPPER (trim (tblcases.investigator)) = UPPER (trim (v_inv))';
    END IF;
    ***************************************************************
    v_sql: = v_sql | "order by tblcases.investigator";
    Return v_sql;
    end;


    Thank you

    wrote:
    Or it is possible to write it this way:

    if v_inv is not null then
    v_sql := v_sql ||'  and UPPER(trim(tblcases.investigator)) = UPPER(trim(:P7_INVESTIGATOR))';
    END IF ;
    

    In this case we will use bind variables and we all know that it is very important.

    Lev

    Of cause, it is the best option. and I strongly suggest the OP to use.
    But it depends on how the sql is used later.
    Without knowing that, we cannot be sure if the item is available here.

  • How to operate my function from PL/SQL?

    I have 4 table

    1st is EMPLOYEE (E #, ENAME), the primary key is E #.

    2nd is DRIVER(E#,L#), the primary key is E # ID EMPLOYEE

    3. is TRIP(T#,L#), the primary key is T #, foreign key L # driver

    4th is the primary key TRIPPT(T#,PT#) T # travel

    I create a function that finds the length (total number of pt #) of the longest point to the driver
    create or replace function LONGPT (DL# in TRIP.L#%type)
       return TRIPPT.PT#%type
    IS
       TRIPPT#   TRIPPT.PT#%type;
    begin
       select max (PT#)
         into TRIPPT# 
         from TRIPPT
        where T# in (select T#
                       from TRIP
                      where L# = DL#);
    
       return nvl (TRIPPT#, 0);
    end LONGPT;
    / 
    How can I do a select query to view the employee NAME, LONGPT. The name of the driver that perform no trigger point must be in the application as well.

    I try
     
    SELECT DRIVER.L# AS License_No, LONGTPT(TRIP.L#) AS "LONGEST POINT" 
    FROM DRIVER 
       LEFT OUTER JOIN TRIP on DRIVER.L# = TRIP.L#;
    This only query the L# and the LONGEST Point.
    Could someone guide me how to do select on screen the ENAME and with my LONGPT function.

    Published by: user4757127 on November 25, 2012 10:11

    Published by: user4757127 on November 25, 2012 10:17

    Published by: user4757127 on November 25, 2012 10:18

    Hello

    Welcome to the forum!

    user4757127 wrote:
    ... How can I do a select query to view the employee NAME, LONGPT. The name of the driver that perform no trigger point must be in the application as well.

    I don't know what you mean by "the employee, LONGPT.

    My best guess is that you need join the employee table in your current query:

    SELECT  driver.l#          AS License_No
    ,     employee.ename                              -- *****  NEW  *****
    ,     longtpt (trip.l#)      AS "LONGEST POINT"
    FROM           driver
    JOIN          employee     ON   driver.e#     = employee.e#     -- *****  NEW  *****
    LEFT OUTER JOIN trip          ON   driver.l#     = trip.l#
    ;
    

    Again, this is just a guess and guess isn't always the best way to solve problems.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • Failed to retrieve the kernel symbols does not have not to initialize the monitoring device can not find valid peer to connect to

    Hello

    I use vmware fusion 5.0.3 on osx 10.7.5. When I start the VM I get these three messages.

    Following this article, I opened the package VM and deleted the .nvram file.

    Still no go.

    I'm a fool. I had renamed some time ago mach_kernel file to test the caching of kernel from loading. This article Impossible to retrieve the kernel symbols gave me the idea to check the file mach.

  • Unable to connect through wireless F4580: "unable to retrieve the IP.

    Hello

    I live in France, where the F4580 and trying to connect wireless.  The printer works fine when connected via USB, but I can't make it work wireless, HP installation wizard gives me:

    IP address: impossible to retrieve the IP

    Subnet mask: Impossible to retrieve the IP

    Default gateway: failed to retrieve the IP

    Preferred DNS server: unable to retrieve the IP

    Auxiliary DNS server: unable to retrieve the IP

    I use a MacBook Pro with Snow Leopard on an ISP Internet Orange Livebox. I saw some issues autour, but none exactly what I have with the same configuration.

    Filtering of Mac addresses: a possibility, but other laptops are able to connect to this wireless with key security without problem. similar here: http://h30434.www3.hp.com/t5/Printer-networking-and-wireless/Wireless-set-up-HP-F4580-vs-Orange-Live... but also seems to be PC

    Orange Livebox problem: question mentioned here: http://livebox.tomhallam.co.uk/tutorials/how-to-install-a-printer-to-your-livebox-liveprinter.html but that seems to be for a PC

    Question in Snow Leopard: is not compatible software for SL? I see this: http://h30434.www3.hp.com/t5/Printer-networking-and-wireless/C4780-Snow-Leopard-Airport/m-p/174198/h... but that's a different printer model

    Issues related to the:

    How to find the IP address of my printer?

    How to find the MAC address of my printer?

    How can I print my network Config page?

    Of the ideas there?  Any help is very appreciated.

    Many routers-wireless Orange Livebox require that press you a button to add a new device to the network.  The button is probably located at the back of the router.

    I think we should start over.  Try the installation process of the printer F4580 using the driver from www.hp.com located here.  Once it scans and detects the printer, press the Connect button on the back of the Livebox wireless router.

Maybe you are looking for

  • Earphone Jack does not. Only hear some audio

    My iPhone has recently had a problem with the use of headphones. Whenever I use my earphones on my phone, I can hear little of instrumental music. I don't hear music or videos. My friend and I have already tested the Atria on his MacBook so we know t

  • E-mail account fails to connect on a regular basis

    Almost every day, my email .me account does not work for a few hours. The phone is set to check my e-mail every 15 minutes, and when the failure occurs that I get the yellow triangle and the message that the account name or the password is incorrect.

  • Workstation Mobile HP8510w: Quick Launch LED buttons unresponsive

    Hello My quick launch buttons stopped responding in the entries. LED bulbs are working and that they do not respond to the touch but this does not cause in any action (WiFi on / off, mute, increase/decrease the volume, etc.). I tried to reinstall the

  • Doctor id 907mbk - 52 k 709-xd002j-60xu03

    What I do for the error in the subject that I find in short dst? Product id wk571ea #abz?

  • Smartphone App World for blackBerry icon is missing from my screen

    Hello Having just upgraded to the Bold 9900, I seem to have lost the App World icon on screen. When I check online applications, he says that the app World is downloaded. Any ideas on what to do? The Orange store wasn't any help. Thank you