Using varray as input parameter & passing it to SP along with otehr params.

HI,
I need to use one of the IN parameter as collection type eg Varray. Other parameters are normal number,date type How would I write the SP to return the resultset to calling program.
If I write below code signature. while fetching refcursor loop values of varray will it work?
eg-
Create or Replace package Pkg1 IS
Type V_type is varray(5000) of Number;
Procedure getvalue(I_val1 IN date, I_val2 IN NUMBER,...,I_val5 IN V_type,
P_out OUT sysrefcursor);
END Pkg1;
Create package body Pkg1 AS
Procedure get_value((I_val1 IN date, I_val2 IN NUMBER,...,I_val5 IN V_type,
P_out OUT sysrefcursor);
IS
BEGIN
open P_out for
For i IN I_val5.FIRST..I_val5.LAST
LOOP
SELECT * from tab1 t
where t.col1 = I_val1
t.col2 = I_val2
t.col5 = I_val5(i);
END LOOP;
END;
END get_value;
END pkg1;
Here we need loop for only I_val5 param and all other parameters are common for each fetch.
will this work?

954825 wrote:
HI,
I need to use one of the IN parameter as collection type eg Varray. If I correctly understand your reqs, you need SQL type, not PL/SQL type. Use could use pre-defined type sys.OdciNumber:ist:
create or Replace
  package Pkg1
    is
      procedure getvalue(
                         I_val1 IN date,
                         I_val2 IN NUMBER,
                         I_val5 IN sys.OdciNumberList,
                         p_out OUT sysrefcursor
end Pkg1;
create or replace
  package body Pkg1
    is
      procedure getvalue(
                         I_val1 IN date,
                         I_val2 IN NUMBER,
                         I_val5 IN sys.OdciNumberList,
                         p_out OUT sysrefcursor
        is
        begin
            open p_out
              for
                select  *
                  from  tab1 t
                  where t.col1 = I_val1
                    and t.col2 = I_val2
                    and t.col5 in (
                                   select  column_value
                                     from  table(I_val5)
      end get_value;
end pkg1;
/SY.

Similar Messages

  • How to register varray datatype input parameter in concurrent program

    Hi All,
    I had a code contains varray datatype input parameter... Now i need to register this in concurret program screen.. which datatype i need to select?... i can able to see only number and character data type in value set.
    Thanks

    As mentioned, the Concurrent progrm APIs are just wrappers and the datatypes are limited. Now, how many items you expect to have in the array as a maximum? You could use the same wrapper concept to collect the array values individually (up to 100) and then just load them to an array to be passed to your stored procedure. Just have an overloaded version with values1..valuesn that is only used as the entry point and then load the values to the structure needed by the program unit containing your logic. There is a limit of 100 parameters, though.

  • Can you pass a hidden value along with your select option in the form selec

    Can you pass a hidden value along with your select option in the html form select

    Off topic. Locking.

  • HT4898 What happens to my "Dock"?  I use that every time I open my computer(s), along with various mail accounts, and even the Widgets?.

    What happens to my "Dock"?  I use that every time I open my computer(s), along with various mail accounts, and even the Widgets?.  Thanks.

    Using iCloud will not affect your dock or your widgets. If you upgrade to iCloud, your MobileMe mail account will be updated to an iCloud account, but that is all that will happen. What exactly is it that you are worried about.

  • Trying to execute a procedure which is using VARRAY as a parameter

    Hi Gurus,
    I am trying to execute a procedure having an array as input.
    However I am getting an error during execution.
    Can you please help me on how to execute a procedure having an array as input?
    create or replace type type_a as table of number(10,0);
    Script:
    declare
    txn_id type_a
    begin
    txn_id type_a()
    txn_id(1) := 516963065;
    procedure_1(emp_id =>1001, txn_id)
    end;

    Try this:
    SQL> CREATE OR REPLACE TYPE type_a AS TABLE OF NUMBER (10, 0)
      2  /
    Type created.
    SQL> CREATE OR REPLACE PROCEDURE procedure_1 ( emp_id NUMBER, p_txn type_a)
      2  AS
      3    i          PLS_INTEGER;
      4  BEGIN
      5    DBMS_OUTPUT.ENABLE (1000000);
      6    FOR i IN 1 .. p_txn.COUNT
      7    LOOP
      8      DBMS_OUTPUT.put_line (TO_CHAR ( i, '00.B') || emp_id || ' = ' || p_txn (i));
      9    END LOOP;
    10  END;
    11  /
    Procedure created.
    SQL> DECLARE
      2    txn_id   type_a;
      3  BEGIN
      4    txn_id      :=
      5      type_a (
      6              516963065
      7            , 1963065
      8            , 2963065
      9            , 3963065
    10             );
    11    procedure_1 ( 1001, txn_id);
    12  END;
    13  /
    01.1001 = 516963065
    02.1001 = 1963065
    03.1001 = 2963065
    04.1001 = 3963065
    PL/SQL procedure successfully completed.:p

  • HT1364 Can I use this procedure to consolidate my iTunes media folder along with my wife's, both in a new, common location?

    Previously we have both kept our music folders independent. I now want to use the procedure described in HT1364 to move both of our music folders into a single, common location. The idea is to use the same media folder but still keep each of our iTunes users separate so that each can maintain its own playlists, etc.
    We share the same home PC but each of us has its own user and as such, each of us have a separate iTunes.  This way we can each keep sync'ing music to each of our separate iDevices but share the same source music folders.
    FWIW, we both use the same appleID for purchases, but each of us have individual AppleIDs for iCloud syncing. We mostly have differents songs, but I estimate that we have about 10% duplicate songs/albums, both form iTunes purchases and uploads from CD's.
    The procedure above describes how to change the location of your music files. Using this procedure I will move my media files to the new, common location. I wil then switch to my wife's iTunes user and will repeat the process.  While doing my wifes procedure I'm wondering what will happen when it detects the duplicates... will it just ignore them? ask me if I want to replace the song file, or just crash and mess up either or both of our libraries?
    I assume that this is the proper way to set up a family Apple ecosystem.  This way when a new member of the family begins collecting music he/she can join the "family music library" and sync only the songs she wants and so on.
    I will welcome your comments and implications of doing procedure above. And also, your comments on the proper way to configure a family ecosystem, if this is not the proper way to do it.
    Merry Christmas to all of you.

    Previously we have both kept our music folders independent. I now want to use the procedure described in HT1364 to move both of our music folders into a single, common location. The idea is to use the same media folder but still keep each of our iTunes users separate so that each can maintain its own playlists, etc.
    We share the same home PC but each of us has its own user and as such, each of us have a separate iTunes.  This way we can each keep sync'ing music to each of our separate iDevices but share the same source music folders.
    FWIW, we both use the same appleID for purchases, but each of us have individual AppleIDs for iCloud syncing. We mostly have differents songs, but I estimate that we have about 10% duplicate songs/albums, both form iTunes purchases and uploads from CD's.
    The procedure above describes how to change the location of your music files. Using this procedure I will move my media files to the new, common location. I wil then switch to my wife's iTunes user and will repeat the process.  While doing my wifes procedure I'm wondering what will happen when it detects the duplicates... will it just ignore them? ask me if I want to replace the song file, or just crash and mess up either or both of our libraries?
    I assume that this is the proper way to set up a family Apple ecosystem.  This way when a new member of the family begins collecting music he/she can join the "family music library" and sync only the songs she wants and so on.
    I will welcome your comments and implications of doing procedure above. And also, your comments on the proper way to configure a family ecosystem, if this is not the proper way to do it.
    Merry Christmas to all of you.

  • Date Format on OWB 11.1.0.7 to use for input parameter for a mapping

    All,
    What is the Date Format on OWB 11.1.0.7 to use for passing in an input parameter for a mapping to execute?
    I have tried '01-01-2010','01-JAN-2010','01.01.2010', 01/01/2010 and I get the following error:
    Error RPE-01003: An infrastructure condition prevented the request from completing.
    Error RPE-01038: Failed to evaluate expression declare l_expression DATE := 01/01/2010;begin :result := wb_rt_conversions.from_date(l_expression);end;. Please modify the expression, redeploy and retry again.
    RA-06550: line 1, column 32:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 24:
    PL/SQL: Item ignored
    ORA-06550: line 1, column 90:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 51:
    PL/SQL: Statement ignored
    I am using a Mapping Input parameter object and have a START_DATE_IN as a DATE and an END_DATE_IN as a DATE
    Any information you could provide would be greatly appreciated.
    Thanks,
    Shaun

    Hello Shaun,
    The function wb_rt_conversions.from_date is (at least in OWB10.2) overloaded and can with input-types as
    date, timestamp_unconstrained, timestamp_tz_unconstrained, timestamp_ltz_unconstrained or varchar2.
    If it doesn't work with varchar2 I would try Date:
    For example: to_date('2010-01-01','YYYY-MM-DD')
    I also found this thread:
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=608257
    Hoping this helps...
    Guenther

  • Using a complex type as my input parameter

    I have defined a complex type that I want to use as my input parameter for one of my operations. I create the operation and add the complex type to my signature. When I go to the 'Query Map' dialog and try and map the complex type to one of my physical data sources the physical data source is deleted from the picutre.
    Here is what my complex type looks like:
    <xs:complexType name="FinancialContractRequestType">
    <xs:complexContent>
    <xs:extension base="srvcfwork:BaseRequestType">
         <xs:sequence>
         <xs:element name="ContractId" type="nylbt:TextType"/>
         <xs:element name="ContractIssueCd" type="nylbt:TextType" minOccurs="0"/>
         </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    When I cut and pasted the xml I didn't put that part in but I do have it. Here is what my whole schema looks like:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:srvcfwork="http://newyorklife.com/schemas/framework" xmlns:nylbt="http://newyorklife.com/schemas/cim/common/nylcorebusinesstypes" xmlns:tns="http://newyorklife.com/services/data/financialcontract" targetNamespace="http://newyorklife.com/services/data/financialcontract" elementFormDefault="qualified" version="0.1">
    <xs:import namespace="http://newyorklife.com/schemas/cim/common/nylcorebusinesstypes"
    schemaLocation="../../../schemas/cim/common/NYLCoreBusinessTypes_0_1.xsd"/>
    <xs:import namespace="http://newyorklife.com/schemas/framework"
    schemaLocation="../../../schemas/framework/ServiceFramework_0_1.xsd"/>
    <xs:element name="FinancialContractRequest" type="tns:FinancialContractRequestType"></xs:element>
    <xs:complexType name="FinancialContractRequestType">
    <xs:complexContent>
    <xs:extension base="srvcfwork:BaseRequestType">
         <xs:sequence>
         <xs:element name="ContractId" type="nylbt:TextType"/>
         <xs:element name="ContractIssueCd" type="nylbt:TextType" minOccurs="0"/>
         </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    </xs:schema>

  • JRC bug: apostrophe in string parameter passed to Crystal Report with Command datasource to SQL Server

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

  • Dynamic Reports. Runtime parameter passing to Report Query.

    Hi everyone,
    I have developed a report using apex shared components (report query and report layout) along with BI Publisher for report printing in pdf format. the Report template is built using Template Builder for Word. I have configured my Apex4.1 env with BI Publisher 11.
    This report is working fine for hardecode ID ( like REQUEST_ID=10 ).
    to make report dynamic i have made following additions in the report
    I have added
    where clause in report query as WHERE REQUEST_ID = :REQUEST_ID (:REQUEST_ID is the text field in my page).
    Added a text field names :REQUEST_ID to get user input at run time.
    Create a button and add Repot Query URL in its properties.
    When i run the report with some valid value in :REQUEST_ID text field  i did not get expected result infect there is no record getting displayed in the PDF file.
    i think this is not the write way to do this but interestingly im not getting any error.
    please can someone guide me that how can i get this functionality in apex this way or the other ?
    Best Regards.

    Hi,
    the online help will help you on how to build a parameter list at all. For your desired functionality, all you need to do is to have the user pressing a button after he selected the parameters he want to assign values to and then create the parameter list in a PSLQL program unit in Forms.
    Frank

  • Cursor like input parameter in function

    Hi, All !
    I have a question. I want use cursor like input parameter in function. How can I do this? Please give my an example.

    in fact i have a loop over a cursor :
    LOOP
    tmp_var:=0;
    FETCH contrat_cursor INTO contrat_rec;
              EXIT WHEN contrat_cursor%NOTFOUND;
    treatment1 -- i want to put all this trt1 in a function , and the function , since it depend on contrat_rec, will have a parameter
    end loop;
    in other context i need this function to make some trt in one row of the table contrat
    so i can get this row with select * from contrat where ...
    my question, is this ok when i give contrat_cursor%ROWTYPE as parameter to the function
    and in the second context, when i get back i row from table contrat , how can i give this row as paramer , in contrat_cursor%ROWTYPE form
    i wish it was clear
    Regards
    Elyes

  • Parameter Passing w/Comma Issue in APEX 4.1

    So I developed and manage a hosted APEX app that was working fine, except there is now a feature since the hosting company upgraded to 4.1.
    I have a button on a page (lets call this page 1), that links to another page (lets call this page 2) and passes a parameter. Unfortunately, the value for this parameter has a "comma" in it, so I used the following technique when passing:
    set these items: P2_NAME
    With these values: *\*&P1_NAME.*\*
    Note the use of the back slash *\* before and after.
    This worked fine in 4.0, but doesn't seem to be working in 4.1
    When I look at the "resolved" URL at run time it appears to be substituting *%255C* instead of the slashes.
    Has anyone else noticed this issue? Do you have a solution?
    Thanks in advance!
    Paul

    Hi Paul,
    can you provide an example on apex.oracle.com where you can reproduce your problem? I tried but was only able to reproduce that the URL is escaped to
    /apex/f?p=887:2:745085782624400::NO::P2_DEPTNO:%5C10%5Cwhich isn't a problem because that will correctly be converted back to
    /apex/f?p=887:2:745085782624400::NO::P2_DEPTNO:\10\by the web server.
    In your case it appears that a double escaping takes place where the % of the above URL is escaped another time to %25. That's why the web server doesn't convert back the URL to the \ sign.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Getting execution input parameter values

    Hi,
    Is it possible to get execution input parameter values from an Out of box Oracle table?
    Let's imagine i am calling a stored procedure and this procedure has two input parameters. Is there a place to get this to input parameter values?
    Regards.

    I agree with Anurag, as the original question is stated, the answer is no.
    Depending on the unspecified in the OP version of Oraclle there are a couple of v$ views that will allow a session to see its own bind variables and there is a view where bind variables can be sampled.
    Running sql trace with bind variables is the only real method of getting these values.
    HTH -- Mark D Powell --

  • Passing multiple values to a single input parameter

    Hi folks,
    I have a Microstrategy query successfully passing input parameter to a calculation view.  For example I can pass a movement type to a material movements calculation view input parameter.  However if I try to pick more than one movement type the query then fails; 
    Generated SQL that works looks like this;
    select
    sum(a11.TOTALQUANTITY)  WJXBFS1
    from
    "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', '101')
    a11
    When choosing more than one value in Microstrategy the SQL now fails and looks like this;
    select
    sum(a11.TOTALQUANTITY)  WJXBFS1
    from
    "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', '101'),
    'PLACEHOLDER' = ('$$MoveType$$', '103'))
    a11
    If I cut and paste the SQL and run directly in HANA studio the error is;
    Could not execute 'select sum(a11.TOTALQUANTITY) WJXBFS1 from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER" ...' in 66 ms 361 µs .
    SAP DBTech JDBC: [2048]: column store error: search parameter error:  [2018] A received argument has an invalid value;TABLE/VIEW parameter: ( 'PLACEHOLDER'='$$MoveType$$, 103') not supported
    Is it possible to pass multiple values in a single parameter?  I'm using SP67 for this test.
    Thanks,
    -Patrick

    Ravi, also to answer one of your questions about how this will work in Microstrategy; I just heard back from my Microstrategy developer and he is trying MSTR Freeform SQL query with syntax like this;
    select (sumPAR_TEST.TOTALQUANTITY TOTALQUANTITY
    from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' =('$$MoveType$$', '[Movement Type]')) PAR_TEST
    In this example [Movement Type] is the microstrategy prompt.  Unfortunately though it translates like this which is missing extra single quotes around each value;
    select     sum(PAR_TEST.TOTALQUANTITY)  TOTALQUANTITY
    from     "_SYS_BIC"."development.pr1959/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', ''101', '102''))   PAR_TEST
    instead of what we need which is;
    ('PLACEHOLDER' = ('$$MoveType$$', '''101'', ''102'''))   PAR_TEST
    So at this point we are not sure if this will be possible or not.
    -Patrick

  • How can I pass dynamic value as a user input parameter in discoverer?

    Hi,
    I have a requirement for a discoverer report like this: The report will display only details for Suppliers that have expired (or soon to be) Insurance details. That is the Expiration Date is less than or equal to the day the report is being run plus any days specified in the Number of Days in the Future Parameter.
    The sample code as:
    SELECT s.segment1 vendor_number
    ,s.vendor_name
    ,flv1.meaning classification
    ,pca.certificate_number
    ,pca.certifying_agency
    ,pca.expiration_date
    ,flv2.meaning status
    FROM ap_suppliers s
    ,pos_bus_class_attr pca
    ,fnd_lookup_values flv1
    ,fnd_lookup_values flv2
    WHERE pca.vendor_id = s.vendor_id
    AND flv1.lookup_code = pca.lookup_code
    AND flv1.lookup_type = pca.lookup_type
    AND flv2.lookup_code = pca.class_status
    AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
    AND pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>
    order by pca.expiration_date asc
    Now the parameter is Number of Days in the Future (Enter the number days in the future to extract the data. This will default to 0).
    Is it possible in discoverer to do so as in query i do that like a condition as pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>.
    How can I pass <No. of Days in the Future> as a user input parameter in discoverer?
    Please help.

    Hi,
    All you need to do is to create the condition in the discoverer instead of in the query.
    Create a custom folder containing the following sq (note that i removed the condition)l:
    SELECT s.segment1 vendor_number
    ,s.vendor_name
    ,flv1.meaning classification
    ,pca.certificate_number
    ,pca.certifying_agency
    ,pca.expiration_date
    ,flv2.meaning status
    FROM ap_suppliers s
    ,pos_bus_class_attr pca
    ,fnd_lookup_values flv1
    ,fnd_lookup_values flv2
    WHERE pca.vendor_id = s.vendor_id
    AND flv1.lookup_code = pca.lookup_code
    AND flv1.lookup_type = pca.lookup_type
    AND flv2.lookup_code = pca.class_status
    AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
    Then create a discoverer report using this folder using all fields.
    Create a new calculation as (use this exact syntax):
    Sysdate + :No_of_Days_in_the_Future
    Create a new condition:
    pca.expiration_date <= <your calculation>
    To complete it add a sort as you did in the SQL.
    That's it.
    Tamir

Maybe you are looking for