Problem with parameter type in stored procedure

Hi,
create or replace TYPE NUMTABLE AS TABLE OF INTEGER;
SELECT group_id, value_id, parent, sort_order
INTO v_groupid, v_valueid, v_parent, v_sortord
FROM req_details
WHERE detail_id = parent_in(i);
I'm trying to pass v_valueId, v_parent, v_sortOrd into testcase_add(valueId, parentIn sortOrder);
but the parameters in the testcase_add procedure are of NUMTABLE type.
How can these values be passed into the testcase_add procedure.
Thanks in advance.

Oracle version number is?
Post the results of the following query:
SELECT position, argument_name, data_type, type_name, type_subname, in_out
FROM all_arguments
WHERE object_name = 'TESTCASE_ADD'
ORDER BY 1;I am not sure, from your example, I understand precisely what you are asking.

Similar Messages

  • IE problem with img tag calling stored procedure

    I have an img tag in my JSP which looks like this (it has a very long src value):
    <img src="http://www.enetrix.com/cores/net_charts.display_temp_chart?vChartDef_in=ChartType%20=%20DIALCHART;Chart
    . . . and so on and so on . . .
    26,%2075.0);&vChartType_in=PNG&vChartURL_in=http://333.333.33.333/j2ee/servlet/chart"/>
    In short, the img calls a stored procedure and passes it a servlet among many other things. The procedure passes back an image to the browser.
    The image shows up in Firefox but not IE 7. I don't think its an issue with the stored procedure but I can't understand why IE doesn't show the image. Is there something I'm missing? I've tried both jpeg and png.
    Thanks
    Eric

    As the related posts suggest, you will need to use direct JDBC code for this.
    Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types.

  • Parameter type in stored procedure call

    What is the best way using ODP.net to reference the parameter type?
    I have several stored procedure in a Oracle 9i database.
    The database looks like:
    Name Null? Type
    FLTID NOT NULL NUMBER(10)
    PLANEID NOT NULL VARCHAR2(3)
    The call in my VB.net app is:
    cmd = New OracleCommand("AeronauticsUtils.Flights_insert", conn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(New OracleParameter("fID", OracleDbType.Int32, ParameterDirection.Input)).Value = row("FLTID")
    cmd.Parameters.Add(New OracleParameter("plnid", OracleDbType.Varchar2, ParameterDirection.Input)).Value = row("PLANEID")
    cmd.ExecuteNonQuery()
    cmd.Dispose()
    What should I use?
    OracleDbType.Int32
    OracleType.VarChar
    Types.OracleDecimal
    or something else?

    I use OracleDbType.Decimal for NUMBER columns and OracleDbType.Varchar2 for VARCHAR2 columns.
    Are you having issues?
    - Mark
    ===================================================
    Mark A. Williams
    Oracle DBA
    Author, Professional .NET Oracle Programming
    http://www.apress.com/book/bookDisplay.html?bID=378

  • Problem with Update Select in Stored procedure

    I am using Oracle 8. I'm writing a StoredProcedure and Oracle doesn't like the statement:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + (select Rate_Monthly from Leave_coverages where Leave_Coverage_ID = 10800)
    where
    Leave_Coverage_ID = 10799;
    When I run the above statement from the command line - I have no problem. This statement in the stored procedure works:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + 4
    where
    Leave_Coverage_ID = 10799;
    So essentially, I'm having trouble using a select in an update statement, but only in a Stored Procedure.

    Denis,
    This question was answered on this forum in the last week or so but I wasn't quickly able to locate this post.
    Basically Oracle prior to version 9 had an SQL parser and a separate PL/SQL parser. The PL/SQL parser had to be updated each time new features were added to the SQL parser; often it lagged behind so that there were things you could do in plain SQL but weren't supported when using the same SQL in a cursor or directly in PL/SQL (with an INTO clause or RETURNING ... INTO clause).
    From Oracle 9 these two parsers have been rolled into one so that new features introduced into SQL automatically also become available when used from PL/SQL.
    So the answer to your curiousity on whether it will work in 9 or 10 is: if it works in SQL it should work just fine from PL/SQL.
    Cheerio,
    Colin

  • Problem with calling a oracle stored procedure

    Hi,
    I am using the following callable statement to invoke a oracle stored procedure/function.
    String myCallableStmt="{?=call IB_DDL.CREATE_DATASET(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
    But I am getting the following errors which do not make sense to me
    Exception in thread "main" java.lang.NullPointerException
         at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:870)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:956)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1159)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3389)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4222)
         at org.jtdemo.CreateDataSet.callCreateDatasetProcedure(CreateDataSet.java:246)
         at org.jtdemo.Main.main(Main.java:29)
    Can anyone help me here.
    Thanks in advance
    Kalyan

    May be I have used the word "procedure" loosely. Its infact a oracle function which returns a message of type Varchar2. Hence "{?=.....} here is used for registering the return value from the function. The remaining statement CREATE_DATASET(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?), here the first 14 are input parameters whereas the last one is the OUT parameter of the function. Hope this helps. Anways I am pasting my code below...
    CallableStatement cstmt = null;
              String myCallableStmt="{?=call IB_DDL.CREATE_DATASET(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
              try {
                   System.out.print("Creating DataSet.......\n");
                   cstmt = targetCon.prepareCall(myCallableStmt);
                   cstmt.setObject("USER_ID_IN",this.USER_ID_IN);
                   cstmt.setObject("TABLE_NAME_IN",this.TABLE_NAME_IN);
                   cstmt.setObject("LAYOUT_IN",this.layoutCollection);
                   cstmt.setObject("DATA_TABLESPACE_IN",this.DATA_TABLESPACE_IN);
                   cstmt.setObject("INDEX_TABLESPACE_IN",this.INDEX_TABLESPACE_IN);
                   cstmt.setObject("STRING_POOL_NAME_IN",this.STRING_POOL_NAME_IN);
                   cstmt.setObject("NUMBER_POOL_NAME_IN",this.NUMBER_POOL_NAME_IN);
                   cstmt.setObject("DATE_POOL_NAME_IN",this.DATE_POOL_NAME_IN);
                   cstmt.setObject("LINK_POOL_NAME_IN",this.LINK_POOL_NAME_IN);
                   cstmt.setObject("DATASET_LEVEL_CONSTR_TYPE",this.DATASET_LEVEL_CONSTR_TYPE);
                   cstmt.setObject("DATASET_LEVEL_CONSTR_BODY",this.DATASET_LEVEL_CONSTR_BODY);
                   cstmt.setObject("POOLING_IN",this.POOLING_IN);
                   cstmt.setObject("SEGMENTATION_IN",this.SEGMENTATION_IN);
                   cstmt.setObject("DATASET_PARTITIONING_IN",this.DATASET_PARTITIONING_IN);
                   cstmt.registerOutParameter("DATASET_ID_OUT",OracleTypes.INTEGER);
                   cstmt.registerOutParameter("RETURN_MESSAGE",OracleTypes.VARCHAR);
                   cstmt.execute();
                   String returnMessage = (String)cstmt.getObject("RETURN_MESSAGE");
                   System.out.print(returnMessage);
              }catch(SQLException e) {
                   e.printStackTrace();
              }

  • Problem with teporary table in stored procedure

    Hi,
    I have to execute a stored procedure in java , where the stored procedure has refcursor as out parameter and within the procedure the refcursor out parameter is populated from a temporary table
    when iam trying to get the resultset in my program iam getting object is no longer in use.
    I think this is becos the temporary table object is not available to my program
    can any one please help me

    I don't understand this part.
    Your procedure has "argSchemaName" as input parameter. Why do you have hardcoded owner name here in the cursor?
    >>
    CURSOR csrEligTables IS
    SELECT
    object_name
    FROM
    all_objects
    WHERE
    Owner = 'HI0XXX001'
    AND
    >>
    The anonymous block that you are running also has same owner name.

  • Problem with temporary table in stored procedure

    Hi,
    I have to execute a stored procedure in java , where the stored procedure has refcursor as out parameter and within the procedure the refcursor out parameter is populated from a temporary table
    when iam trying to get the resultset in my program iam getting the oracle error: ora-08103 object is no longer in use.
    I think this is becos the temporary table object is not available to my program
    can any one please help me

    I don't understand this part.
    Your procedure has "argSchemaName" as input parameter. Why do you have hardcoded owner name here in the cursor?
    >>
    CURSOR csrEligTables IS
    SELECT
    object_name
    FROM
    all_objects
    WHERE
    Owner = 'HI0XXX001'
    AND
    >>
    The anonymous block that you are running also has same owner name.

  • Problem with Parameter on stored procedure for in() condition

    Hello,
    I would like to pass a parameter to a stored procedure like :
    procedure sps_country(zones varchar2)
    is
    begin
    select * from country where zone in (zones);
    end sps_country;
    My problem is : when i have one value in "zones" parameter all is OK but when i have 2, 3 ... values in zones with this format : ##, ##, ## there is no error, but there is no results found.
    have you a solution please ?
    Thanks

    Also this document has some suggestions.

  • Problem in OUT Parameter in the stored procedure

    Hi,
    I have a problem in the OUT parameter of the stored procedure under the package. I encountered the error PLS-00306. Below are the codes.
    Package
    CREATE OR REPLACE package body test as
         procedure sp_countries(rst OUT country_typ) as
         sql_stmt VARCHAR2(300);
         begin
         sql_stmt := 'SELECT * FROM countries WHERE region_id = 1';
         OPEN rst FOR sql_stmt;     
         end;
    end test;
    by the way. i declared the country_typ as this:
    TYPE country_typ IS REF CURSOR;
    Here is the code that will call this package:
    declare
    tst countries%ROWTYPE;
    begin
    test.sp_countries(tst);
    dbms_output.put_line(tst.country_name);
    end;

    Works for me. Although I had to use emp instead of your table:
    SQL> create or replace
      2  package test as
      3     TYPE country_typ IS REF CURSOR;
      4     procedure sp_countries(rst OUT country_typ);
      5  end;
      6  /
    Package created.
    SQL> CREATE OR REPLACE
      2  package body test as
      3     procedure sp_countries(rst OUT country_typ) as
      4        sql_stmt VARCHAR2(300);
      5     begin
      6        sql_stmt := 'SELECT * FROM emp WHERE deptno = 20';
      7        OPEN rst FOR sql_stmt;
      8     end;
      9  end test;
    10  /
    Package body created.
    SQL> var tcur refcursor
    SQL> exec test.sp_countries(:tcur);
    PL/SQL procedure successfully completed.
    SQL> print tcur
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    SQL>

  • Pass a datarow as input parameter in a stored procedure

    Hi everyone!
    I wonder if anyone know how to pass a datarow (better if tipized like "tablenameRow") as input parameter for a stored procedure.
    links or suggestions are welcome! (i'm newbie in .net programming, so if you can post some code i'll be really grateful!)
    Thank you!

    Hi,
    YES!! its possible you can pass a datarow to a SP from your Dot net application.
    Here below i'm going to give you an example for Desktop Application.
    For Passing a datarow as Input Parameters, your SP need to support for all these parameters.
    I mean, if a data row has 03 Columns. Then your procedure should be able to take 03 arguments/parameters.
    --Adjust code according to your need.
    --Its for C# Desktop application.
    --Visual Studio Professional, Framework (2.0)
    //Setting connections.
    OracleConnection con=new OracleConnection("Data Source=orcl9i; user id=scott; password=tiger");
    OracleComand cmd=new OracleCommand(con);
    cmd.Type=CommandType.StoredProcedure; //you are useing SP
    cmd.Text="my_stored_procedure"; //Mention SP name.
    --if DataRow has Three columns. You need three parameters.
    OracleParameter p1=new OracleParameter ();//By default parameters are input parameters.
    OracleParameter p2=new OracleParameter ();
    OracleParameter p3=new OracleParameter ();
    //We assume that Datarow already has data in it.
    p1.ParametersName="sp_var1 ";
    p1.OracleDbType=OracleDbType.Varchar;
    p1.Value=tablenameRow[1]; //Here DataRow object's Column1 is input.
    p2.ParametersName="sp_var2 ";
    p2.OracleDbType=OracleDbType.Varchar;
    p2.Value=tablenameRow[2]; //Here DataRow object's Column2 is input.
    p3.ParametersName="sp_var3 ";
    p3.OracleDbType=OracleDbType.Varchar;
    p3.Value=tablenameRow[3]; //Here DataRow object's Column3 is input.
    cmd.OracleParameter.Add(p1); //Add parameters.
    cmd.OracleParameter.Add(p2); //Add parameters.
    cmd.OracleParameter.Add(p3); //Add parameters.
    cmd.ExecuteNonQuery(); //Execute Procedure here.
    Feel free to ask if still found problem.
    ....

  • How to pass the parameter of a stored procedure to iReport

    Hi... i don't know how to pass the parameter of the stored procedure to the iReport.
    In the Report Query, i tried
    1. sp_storedprocedure ' value'
    2. sp_storedprocedure +''''+$P{parameter}+''''+
    3. sp_storedprocedure +$V+$P{parameter}++$F($F is a variable having a value of ' (a single quote))may you enlighten us please? thank you

    For M$ SQL server I find that it only works when U use the fully qualified name...
    e.g. catalod.dbo.my_procedure_name 'variable'
    My full query in the Report Query window is something like this:
    EXEC arc.dbo.jasper_Invoice 1000
    Note that you may find that selecting from VIEWS / TABLES fails for no apparent reason and iReport will prompt you with the usual very unhelpful (we have what we "pay" for) prompt, stating that "The document is empty".
    To work around this issue, where a statement like "SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id=1000" does not work, simply create a PROC, something like:
    CREATE PROC jasper_MyProc (@my_rec_id integer) AS
    SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id= @my_rec_id integer
    ...to wrap your SELECT statement, then call the PROC
    Edited by: Sylinsr on Apr 22, 2008 4:23 PM

  • Passing Multi-Value Parameter to a Stored Procedure

    Has anyone experienced passing a Parameter (MultiValue) to a Stored Procedure? I am aware that Crystal Passes the Param as an Array. How would you go about handling this within a Stored Procedure???

    Hi Daniel
    Try as below:
    1. Create a Crystal report, and add a multi-value parameter.
    2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
    //Formula: @JoinFormula
    Join ({?Multi-value parameter array},";")
    ====================
    NOTE:
    In the formula above, a semi-colon (";") is the delimiter.
    ====================
    3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
    4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
    Doing so passes a multi-value parameter to the stored procedure.
    Hope this helps!!!!
    Regards
    Sourashree

  • How to pass parameter from 1 stored procedure to another stored procedure inside crystal report

    Hi
    I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
    I have 3 stored procedure
    The 1st one is used to gather information and process the calculation
    another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
    After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
    Thanks in advance
    Chi

    Hi Chi
    To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
    After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
    Regards
    Poonam Thorat.

  • Problems with parameter button in Crystal Report Server  2008

    Dear all,
    I have problems with parameter button in Crystal Report Server 2008.
    when I created some parameters and groups in Crystal Report 2008, they showed both parameters in 'Parameter button' and group in 'Group button'  on the left, so I can choose or type without clicking 'Refresh button' But when I added it to Crystal Report Server 2008 and I click parameter button , it doesn't show any parameter. Only click refresh button to choose them. On the other hand, for 'Group Tree' is ok. When go to Default Setting-> Parameter, all parameters are in 'Unused parameter'  First time I think I had problems with my installation, but when I reinstalled it again, it was like before.
    Could any one help me with this?
    I appreciate looking forward to your reply
    Ketya

    Try posting your questionin the correct forum, this is for SAP Business One, not Crystal reports Server

  • How to pass a table as parameter on a stored procedure

    Hello all,
    I want to pass the name of a table as parameter into a stored procedure, that will be used for cursors etc.
    But when i pass the parameter and i compile the S.P. it give me error (error: table not existing...)
    Any Help?
    Thanks in advance, Marco

    Marco wrote:
    As i've written above, i'm using stored procedures like 'batch' programs which will be executed with oracle scheduler (passing to s.p. the name of the 'input' tables)
    These input tables are 'external' tables which have got the same structure; for example i've got TABLEX_001, TABLEX_002, XXTAB etc. with the same structure.
    This is the the reason... what do you think?An external table definition can reference multiple files via the LOCATION definition or you can user "ALTER TABLE" to alter the location and change the file that the external table points to.
    Thus you only need one static External Table and use an alter table (via execute immediate) to change the file location it points to, or if you want all the data together, just specify all the files in the location.
    That would be clean design, using one fixed table, without the need to pass any table names, just dynamically altering the file names if necessary at run time.

Maybe you are looking for

  • Image Export

    Hello When using Acrobat 9 Pro to export a JPEG at high resolution (e.g. 600DPI or more), I often get the error message "The image is too wide to output. Please crop it or reduce resolution and try again." This means I end up with a JPEG of much lowe

  • Reader 7 commenting turns off with save

    Acrobat 9 extended. Having set commenting enabled for the reader (v7 & 9), the recipient can create comments and save them. On reopening the document containing the comments the comments are there but the commenting rights have now disappeared and no

  • Remove billing block on a sales document in background

    Hi I have a sales document (a credit memo request) for which we need to remove the billing block. when we are trying to remove the billing block via V.23, the system times out as the document is very big. I tried running v.23 in background but this d

  • On my iTunes page it keeps telling me there are updates available but there are not.

    In my iTunes account it tells me i have updates available however when i go to do the updates there is nothing to update. Finding this really annoying and would like to get this fixed. Anyone got any tips?

  • Problema con formulario php museCC

    Hola tengo un problema, Hice un formulario en el adobe museCC, con un widget de formualrio, la web esta en un servidor propio, no está en el adobe catalyst y tengo problemas: No funciona, me hace un error, cuando se envía el formularío, me sale una v