How to invoke PL/SQL Table parameter in the query string?

Hello,
I've met a problem invoking PL/SQL Table parameter in the query string, in OWS 3.0.
What I'm going to do is, to invoke a stored procedure to generate a web page using PL/SQL Web Toolkit 2.0, like: "http://.../owa/test_proc".
But there is a IN parameter for this procedure, and it's a PL/SQL Table variable. So I can't invoke the procedure sucessfully just using "http://.../owa/test_proc?v_plsql=i_plsql".
Did someone have met this kind of problem or have the answer to it? Thanks so much for your help.

When using procedures with pl/sql-tables as parameter they should be overloaded, e.g.:
procedure my_procedure (my_var in varchar2)...
and
procedure my_procedure (my_var in owa_util.ident_arr)
the procedure then can be called with:
http://..../my_procedure?my_var=Scott, which invokes the version with the varchar2 parameter, or
http://..../my_procedure?my_var=Scott&my_var=Miller......
which invokes the version with the pl/sql-Table
Another solution might be the use of flexible parameters, passing pairs of parameter_name, parameter_value to your procedure. Your procedure looks like:
procedure my_procedure (name_array IN owa.vc_arr, value_array IN owa.vc_arr)..
and is invoked (note the ! )
http://..../!my_procedure?ename=Scott&sal=200&job=clerk.....
looping through the pl/sql tables will retrieve values of ename, sal and job for name_array and Scott, 200 and clerk for value_array
Hth
null

Similar Messages

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • Passing a parameter in the query string

    When a string containing a �+� is passed as a parameter in the URL in the query string through a POST request, it is interpreted as two strings separated by a �+� and thus when the string is retrieved through a request.getParameter (),it returns the string with a space in place of the �+� sign.
    eg:
    String dblink = "/TCE/servlet/LoginService?name="+vSystemAccount.getAccountName()+"&password="+pw;
    Here the parameter pw contains a '+' sign which when retrieved by a request.getParameter() returns the parameter with a space in place of the '+' sign.How can i prevent this??

    Hi,
    In post method , the data is sent as request message body. The data is passed as query string in Get method not in Post method.
    Could you please explain your question again ?
    bye for now
    sat

  • How to manage Locale info in the URL path, but not the query string

    We are building an application using Struts 1.1 and Tiles, on Oracle Application Server 10.1.3.3...
    I know this is a strange question... but we have a requirement to represent the locale info in the URL string using one of the following options:
    option 1: /eng/page.do?id=2 for english.../fra/page.do?id=2
    option 2: /page-eng.do?id=2 for english.... and /page-fra.do?id=2 for french
    We need to represent the 3 letter ISO lang code either in the directory structure, or suffix the page name (in our case, the struts action name)... we cannot replicate this using a parameter in the query string. I know this is odd, but that is what we are told to implement.
    Is there any robust way of implementing either option in Struts 1.1, JSP, JSTL etc...?
    Currently, we are looking at using a servlet filter to intercept the HTTP requests, parse the URL string, and extract the ISO lang value, and set locale and forward on the request.
    This poses a few problems... adding additional action mappings (page-eng... page-fra... page) to our struts-xml.config file to handle lang permuations... but the biggest issue is all the embedded html:link action values throughout our code...
    Because all our public facing URLs must comply with the rule, we need to change the html:link action to point to a different action, based on locale.
    Very inefficent, and I'm sure not industry standard best practice... we are using Tiles, and resource bundles for all our labels etc... but fall short in meeting this rule with regards to URLs and locale.
    Any advice or tips etc.. is greatly appreciated.

    The filter option sounds like a good solution. So it can receive the urls and parse them appropriately.
    You just need to take it one step further.
    Additional actionmappings in your struts-config should not be necessary.
    Filter:
    - analyses the url and sets the appropriate locale
    - adjusts the url such that the next level of the chain does not have to know anything about the locale being encoded in the url string.
    Thus your struts classes and mappings can remain unchanged
    /eng/page.do or /fra/page.do once through the filter should just look like /page.do to struts.
    That should get rid of half of your headache.
    Next the issue of generating urls.
    There are two approaches I can see here
    1 - use the filter approach again, this time with some post processing. Gather the generated HTML in a buffer, and do a find/replace on any urls generated, to put the locale encoding into them.
    2 - Customise struts to produce urls in this format. This would involve the html:link tag, and the html:form tag at the least (maybe others?). Get the source code for struts, and grab the html:link tag code. Extend that class to generate urls as you want them to be generated. I think you would need to extend the class org.apache.struts.taglib.html.LinkTag and override the protected method calculateURL. You would then have to edit/modify the struts-html tld to point the link tag at your classes rather than the standard ones.
    Option 1 is architecturally good because it gives you a well defined layer/border between having the locale encoded in the url, and not having it there. However it involves doing a find/replace on every html going out. This would catch all urls, whether generated by html:link tag or not.
    Option 2 requires customising struts for your own requirements, which may be a bit daunting, but has the advantage of generating the urls correctly without the extra overhead involved with option 1. Of course you would have to ensure that ALL urls are generated with the html:link tag.
    On reflection, I think option 1 is preferable, as both easier and quicker to implement, and doing a better separation in the architecture.
    Cheers,
    evnafets

  • How can i pass a parameter to the query to filter the result of this lookup

    Hello,
    i'm developping a web application with JDeveloper 10.1.2 and JHeadStart.
    i realy need to know how can i filter the lookup (LOV) query result.
    in other word, when i click on the lookup, it show all the row that exist in may data base table.
    what i want is how can i pass a parameter to the query to filter the result of this lookup ?
    Thank you

    Hi,
    have a look if this helps
    http://oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
    Frank

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • How to view data in tables by selecting the synonym from the database objec

    I could not figure out how to view data in tables by selecting the synonym from the database objects navigation tree. I had to first choose the synonym, view the details of the synonym to determine the table name, and then select the table from the database objects tree. Is this the only way available?

    This functionality currently does not exist. I don't see it on the 1.1 statement of direction either, so perhaps someone from Oracle can give some insight as to when this could be expected.
    Eric

  • How can I use SQL to check if the receipt is accounted?

    Dear all:
    How can I use SQL to check if the AR receipt is accounted ? Because there is so many receipts to check, I cannot open it to see the detail one by one.
    My environment is :11.5.9
    database : Oracle 9.2.0.8

    Duplicate post.
    How can I use SQL to check if the receipt is accounted?
    Re: How can I use SQL to check if the receipt is accounted?

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Bex Query: Too many table names in the query The maximum allowable is 256

    Hi Experts,
    I need your help, Im working on a Query using a multiprovider of 2 datastores, I need to work with cells to assign specific acconts values to specific rows and columns, so I was creating a Structure with elements from a Hierarchy, but I get this error when I'm half way of the structure:
    "Too many table names in the query. The maximum allowable is 256.Incorrect syntax near ')'.Incorrect syntax near 'O1'."
    Any idea what is happening? is ti possible to fix it? do I need to ask for a modification of my Infoproviders? Some one told me is possible to combine 2 querys, is it true?
    Thanks a lot for your time and pacience.

    Hi,
    The maximum allowable limit is 256 holds true. It is the max no. of characteristics and key figures that can be used in the column side. While creating a structure, you create key figures (restricted or calculated) and formulas etc.. The objects that you use to create these should not be more than 256.
    http://help.sap.com/saphelp_nw70/helpdata/EN/4d/e2bebb41da1d42917100471b364efa/frameset.htm
    Not sure if combination of 2 query's is possible.  You can use RRI. Or have a woorkbook with 2 queries.
    Hope it helps.

  • [Execute SQL Task] Error: Executing the query failed with error: "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION."

    I have an package with source , data flow and destination to execute on begin and commit.
    in the below i have just used for questioning purpose with diagram removing my Data Flow task explaining my problem
    on execution, i get error as
    [Execute SQL Task] Error: Executing the query "COMMIT TRAN DimCompanyCode" failed with the following error: "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly.
    as mentioned , i have checked the ResultSet, parameters , connection establish.. all are fine.
    Kindly advice on what has to be done.
    ShanmugaRaj

    To avoid this error, the RetainSameConnection property should set to 'True' for the Connection Manager - Application_DB.
    Narsimha

  • How to fetch the query string in BW?

    Hi Gurus,
    How can fetch the query string from BW Server to implement  Bex web application Iview.
    *Now to get the information "BEx Web Application Query String". open the SAP Log on and open the BW Browser, double click any of the queries available, this will open a window and select the Query String ( it should be between & to end &).*
    Explain the above point with more detail like how will open the bw browser what is the step for that?where the query string will available in BW browser.
    Higher points will be rewarded for valuable inputs.
    Thanks in Advance,
    Dharani

    hi ,
    What krishna suggested is right ... Another method can be like :
    &CMD=LDOC&infocube=0D_DECU&query=SALES_DEMO_2
    Get this information from your BI consultant.
    Please close thread if you got ur answer!!!
    Regards
    Parth

  • Accessing the Query String parameter from a portlet

    Hi!
    I have developed a PDK portlet in Jdev 10.1.3.3 for Web Center (Just for testing, later it'll go on Oracle Portal 10.1.4). I am trying to access the query string parameter coming in the URL but not successfull at all. Following are the options that I have tried in vain :
    In MyPDkPortletShowPage.jsp with *<passAllUrlParams>true</passAllUrlParams>*
    1.) PortletRenderRequest pReq = (PortletRenderRequest) request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    pReq.getParameter("data");
    2.) request.getParameter("data");
    3.) request.getAttribute("data")
    This makes me ask that is there any other way to access the parameter or is it simply not possible?
    Please suggest!
    Regards,
    Neeraj.

    Hi Neeraj:
    I didn't deal with web center before i am working on Oracle Portal 10.1.4 so if you done that on oracle portal and got the same problem check for this?
    - add the parameter in the page parameter then you will get the value from either preq.getParameter or from request.getParameter,just go to page properties and add a page
    parameter called data
    - did you publish your page containing your portlet as portlet and included it in other page or it is just a page containing this portlet?

  • How to use PL/SQL table

    Hi all,
    can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
    DECLARE
        TYPE cur_typ IS REF CURSOR;
        c           cur_typ;
        total_val varchar2(1000);
        sql_stmt varchar2(1000);
        freeform_name NUMBER;
        freeform_id NUMBER;
        imgname_rec EMC_FTW_PREVA.EMC_Image_C_Mungo%rowtype;
        imgval_rec  EMC_FTW_PREVA.EMC_Content_C_Mungo%rowtype;
        CURSOR imgname_cur IS
            select * from EMC_FTW_PREVA.EMC_Image_C_Mungo
            where cs_ownerid in (
                        select id from EMC_FTW_PREVA.EMC_Image_C
                        where updateddate > '01-JUN-13'
                        and path is not null
                        and createddate != updateddate)
            and cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = 'Image_Upload');
    BEGIN
        OPEN imgname_cur;
        LOOP
          FETCH imgname_cur INTO imgname_rec;
          EXIT WHEN imgname_cur%NOTFOUND;
          total_val := 'EMC_Image_C_' || imgname_rec.cs_ownerid;
          sql_stmt := 'SELECT instr(textvalue,''' || total_val || '''), cs_ownerid FROM EMC_FTW_PREVA.EMC_Content_C_Mungo a Where cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = ' || '''' || 'Body_freeform' || '''' || ')';
            OPEN c FOR sql_stmt;
            LOOP
              FETCH c INTO freeform_id,freeform_name;
              EXIT WHEN c%NOTFOUND;
                                      IF freeform_id > 0 THEN
                dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
                                      END IF;
            END LOOP;
            CLOSE c;     
       END LOOP;
       CLOSE imgname_cur;
    END;
    Thanks in Advance.

    can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
    There would be absolutely no point at all in improving the performance of code that has NO benefit.
    The only result of executing that code is to possibly produce some lines of output AFTER the entire procedure if finished:
    dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
    So first you need to explain:
    1. what PROBLEM you are trying to solve?
    2. why you are trying to use PL/SQL code to solve it.
    3. why are you using 'slow by slow' (row by row) processing and then, for each row, opening a new cursor to query more data?
    You should be using a single query rather than two nested cursors. But that begs the question of what the code is even supposed to be doing since the only output is going to a memory buffer.

  • How to execute an sql function containing a SELECT query as paramete

    Hi
    I want to execute this sql query using JDBC methods , but could not be able to find any appropriate method to execute this query.
    select dbms_xmlgen.getxml(select * from departments) from dual
    please some one help with appropriate java code to execute it.
    Thank you

    >
    I want to execute this sql query using JDBC methods , but could not be able to find any appropriate method to execute this query.
    select dbms_xmlgen.getxml(select * from departments) from dual
    please some one help with appropriate java code to execute it.
    >
    Java code? You can't execute that query at all since it is invalid. The parameter needs to be a query string NOT a query.
    select dbms_xmlgen.getxml('select * from departments') from dual See the DBMS_XMLGEN package in the docs
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_xmlgen.htm#i1013206
    >
    Converts the results from the SQL query string to XML format, and returns the XML as a temporary CLOB, which must be subsequently freed using the DBMS_LOB.FREETEMPORARY call:
    DBMS_XMLGEN.GETXML (
    sqlQuery IN VARCHAR2,
    dtdOrSchema IN number := NONE)
    RETURN CLOB;
    >
    Then you execute that query like any other query that returns a result set. The result set will consist of one row and one column of CLOB datatype.
    See the JDBC Developer's Guide - it has examples of how to execute queries that return result sets.
    And this section shows how tow read/write CLOBs
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/oralob.htm#sthref755

Maybe you are looking for

  • My D420 is not working on my new Mac Mini I need help

    I have a new Canon Printer D420 . I love the machine works great the price was great. It worked good on my old Imac for a few weeks then I bought a new Mac Mini and now I can't get it to work. I reloaded my solfware taht came with it..... need help t

  • Email addresses & app world

    Hello everyone!  I have just bought myself the Curve 9300 and given my old bb (8520) to a friend. He's just tried to access bb app world but it came up with my email address and required my password. He said he attempted to put another email address

  • Downloading Movie. Can I watch something else?

    I have a new Apple TV 2 and have just rented my first movie. It is taking a long time to download. Can I watch something else while the download continues? I would like to watch something from Netflix. Thanks.

  • Column & Row Headings

    Is there any way in Numbers to suppress the display (viewing and/or printing) of row and/or column headings? For example, I don't want to see A,B,C,... across the top or 1.2.3... down the left side. Besides, by suppressing these displays I should be

  • Upgrade existing FAST ESP 5.3 SP4 implementation to SP5

    Hi,     We have a FAST ESP 5.3 SP4 implementation in our environment in Windows 2008 server OS. We want to upgrade it to SP5. What measures should I take before upgrading it. We have SAM component available with us. Is this up-gradation going to impa