Return values for Stored Procedures

Hi,
How do you catch the return values from the stored procedures in a JCX? I have
stored procs that return error codes.
These error codes will to be displayed to the user in a user-friendly format.
Thanks,
Laxman

Hi,
How do you catch the return values from the stored procedures in a JCX? I have
stored procs that return error codes.
These error codes will to be displayed to the user in a user-friendly format.
Thanks,
Laxman

Similar Messages

  • How to get return values from stored procedure to ssis packge?

    Hi,
    I need returnn values from my stored procedure to ssis package -
    My procedure look like  and ssis package .Kindly help me to oget returnn value to my ssis package
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [TSC]
    -- Add the parameters for the stored procedure here
    @P_STAGE VARCHAR(2000)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    --SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
    truncate table [INPUTS];
    INSERT
    INTO
    [INPUTS_BASE]
    SELECT
    [COLUMN]
    FROM [INPUTS];
    RETURN
    END
    and i am trying to get the return value from execute sql task and shown below
    and i am taking my returnn value to result set variable

    You need to have either OUTPUT parameters or use RETURN statement to return a value in stored procedures. RETURN can only return integer values whereas OUTPUT parameters can be of any type
    First modify your procedure to define return value or OUTPUT parameter based on requirement
    for details see
    http://www.sqlteam.com/article/stored-procedures-returning-data
    Once that is done in SSIS call sp from Execute SQL Task and in parameter mapping tabe shown above add required parameters and map them to variables created in SSIS and select Direction as Output or Return Value based on what option you used in your
    procedure.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Pass parameter values for stored procedure in URL, possible?

    Hi, everyone, Our system is Apex4.0.2 in Linux CentOS 5 on Oracle 11GR2, here is the procedure:
    create or replace  procedure  test_public(Cust_id integer)
    is
    begin
    owa_util.mime_header( 'text/xml', FALSE );
    owa_util.mime_header( 'application/octet', FALSE );
    -- Close the HTTP Header
    owa_util.http_header_close;
    htp.p(DBMS_XMLGEN.getXML('SELECT * FROM demo_orders where customer_id='|| cust_ID));
    end;
    +/+
    the call to the stored procedure is SUCCESSFUL when Test_public has no parameters, like:
    http://myserver/apex/myschema.test_public (OK)
    the question is : I want to pass 3 parameters into my stored procedure(on production procedure), just don't know How?
    Any suggestions are greatly appreciated

    Thanks, Vee, definitely working, I do appreciate your help.
    I have to use Stored Procedure in Apex: my goal is to setup RESTful web service for IOS and Andriod alike, but APEX RESTful only supports SQL Report ( the RESTFUL check Box goes away with PL/SQL returning Query report, much to my surprise), I need expose some data and the same time I need insert/update some data when the client consumes our data, a PL/SQL based Report will do, but as I found out only simple SQL report has RESTful service, a Before REGION Process will do too, but web service connection WON'T fire that process (normal page display will fire the process) so I'm out of option.... Man I wish APEX REST is not so so basic....

  • How to capture return value from stored procedure?

    Hi All,
    I want to capture the retun values from this procedure to a table - CALL SYS.GET_OBJECT_DEFINITION('SCHEMA_NAME', 'TABLE_NAME').
    The below approach is not working -
    Insert  into STG.STG_DDL
    Call SYS.GET_OBJECT_DEFINITION('DWG', 'DWG_SITE')
    Could you please have a look on the same?
    Thank you,
    Vijeesh

    Thanks a lot Everyone.
    Considering the discussed options, and an approach explained in this thread - -http://scn.sap.com/thread/3291461  , I have written an SQL to build the Alter statements to add the columns & Constrains to table.
    The below Query will provide the scripts to build a table in another environment.
    select * from (
       select TABLE_name,'tbl_Create' column_name, 1 as position, 'CREATE TABLE '|| schema_name ||'.'|| table_name ||' (  DUMMY_CLMN INTEGER);' as SQLCMD
         from tableS
        where  schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
    UNION ALL
    -- MASS change of NOT NULL COLUMNS
    -- set to NOT NULL - character data type, double, decimal fixed - need the length but not the scale
       select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||') NOT NULL) ;' as SQLCMD
         from table_columns
        where is_nullable = 'FALSE'
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('VARCHAR', 'NVARCHAR', 'DOUBLE')
          and scale is NULL
    UNION ALL
    -- MASS change of NOT NULL COLUMNS
    -- set to NOT NULL - character data type, double, decimal fixed - need the length but not the scale
       select TABLE_name,column_name, position + 100,'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||') );' as SQLCMD
         from table_columns
        where is_nullable = 'TRUE'
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('VARCHAR', 'NVARCHAR', 'DOUBLE')
          and scale is NULL
    UNION ALL
    -- set to NOT NULL - DECIMAL (FLOATING POINT)- needs length and scale
       select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||','|| scale ||') NOT NULL) ;' as SQLCMD
         from table_columns
        where is_nullable = 'FALSE' 
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('DECIMAL' )
          and scale is not null
    UNION ALL
    -- set to NOT NULL - DECIMAL (FLOATING POINT)- needs length and scale
       select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||','|| scale ||') ) ;' as SQLCMD
         from table_columns
        where is_nullable = 'TRUE'
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('DECIMAL' )
          and scale is not null
    UNION ALL
    -- set to NOT NULL - DECIMAL (FLOATING POINT)- needs length and null scale
       select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||') NOT NULL) ;' as SQLCMD
         from table_columns
        where is_nullable = 'FALSE' 
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('DECIMAL' )
          and scale is  null
    UNION ALL
    -- set to NOT NULL - DECIMAL (FLOATING POINT)- needs length and null scale
       select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' (' || length ||') NOT NULL) ;' as SQLCMD
         from table_columns
        where is_nullable = 'TRUE'
          and schema_name ='DWG'
          and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
          and data_type_name in ('DECIMAL' )
          and scale is  null
    UNION ALL
    -- set to NOT NULL -  DATE | TIME | SECONDDATE | TIMESTAMP | TINYINT | SMALLINT | INTEGER - don't need length  or scale
    select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' NOT NULL) ;' as SQLCMD
       from table_columns
      where is_nullable = 'FALSE'
        and schema_name ='DWG'
        and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
        and data_type_name in ('DATE', 'LONGDATE', 'TIME', 'SECONDDATE', 'TIMESTAMP', 'TINYINT', 'SMALLINT', 'INTEGER' )
    --   and scale is not null   
    UNION ALL
    -- set to NOT NULL -  DATE | TIME | SECONDDATE | TIMESTAMP | TINYINT | SMALLINT | INTEGER - don't need length  or scale
    select TABLE_name,column_name, position + 100, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' ADD ('||column_name ||' '||data_type_name ||' ) ;' as SQLCMD
       from table_columns
      where is_nullable = 'TRUE'
        and schema_name ='DWG'
        and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
        and data_type_name in ('DATE', 'LONGDATE', 'TIME', 'SECONDDATE', 'TIMESTAMP', 'TINYINT', 'SMALLINT', 'INTEGER' )
    --    and scale is not null
    UNION ALL
    select table_name, 'PK' AS column_name, 9990, 'ALTER TABLE '||table_name||' ADD CONSTRAINT Primary_key PRIMARY KEY ('||PK_COLUMN_NAME1||
    case when  PK_COLUMN_NAME2 is null then  ' ' else ','|| PK_COLUMN_NAME2 end ||
    case when  PK_COLUMN_NAME3 is null then  ' ' else ','|| PK_COLUMN_NAME3 end ||
    case when  PK_COLUMN_NAME4 is null then  ' ' else ','|| PK_COLUMN_NAME4 end ||');'
    from
    (SELECT DISTINCT C1.table_name , C1.COLUMN_NAME AS PK_COLUMN_NAME1, C2.COLUMN_NAME AS PK_COLUMN_NAME2, C3.COLUMN_NAME AS PK_COLUMN_NAME3, C4.COLUMN_NAME AS PK_COLUMN_NAME4
                         FROM (SELECT * FROM CONSTRAINTS WHERE POSITION=1 AND IS_PRIMARY_KEY = 'TRUE') C1
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=2 AND IS_PRIMARY_KEY = 'TRUE') C2
                                ON C1.table_name = C2.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=3 AND IS_PRIMARY_KEY = 'TRUE') C3
                                ON C2.table_name = C3.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=4 AND IS_PRIMARY_KEY = 'TRUE') C4
                                ON C3.table_name = C4.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=5 AND IS_PRIMARY_KEY = 'TRUE') C5
                                ON C4.table_name = C5.table_name
                         ) PK     
    where table_name = 'DWG_PRODUCTION_VOLUME_TRX'
    UNION ALL
    select table_name, 'UK' AS column_name, 9991,  'ALTER TABLE '||table_name||' ADD CONSTRAINT UNIQUE ('||UK_COLUMN_NAME1||
    case when  UK_COLUMN_NAME2 is null then  ' ' else ','|| UK_COLUMN_NAME2 end ||
    case when  UK_COLUMN_NAME3 is null then  ' ' else ','|| UK_COLUMN_NAME3 end ||
    case when  UK_COLUMN_NAME4 is null then  ' ' else ','|| UK_COLUMN_NAME4 end ||');'
    FROM
    (SELECT DISTINCT C1.table_name , C1.COLUMN_NAME AS UK_COLUMN_NAME1, C2.COLUMN_NAME AS UK_COLUMN_NAME2, C3.COLUMN_NAME AS UK_COLUMN_NAME3, C4.COLUMN_NAME AS UK_COLUMN_NAME4
                         FROM (SELECT * FROM CONSTRAINTS WHERE POSITION=1 AND IS_PRIMARY_KEY = 'FALSE') C1
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=2 AND IS_PRIMARY_KEY = 'FALSE') C2
                                ON C1.table_name = C2.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=3 AND IS_PRIMARY_KEY = 'FALSE') C3
                                ON C2.table_name = C3.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=4 AND IS_PRIMARY_KEY = 'FALSE') C4
                                ON C3.table_name = C4.table_name
                         LEFT JOIN (SELECT * FROM CONSTRAINTS WHERE POSITION=5 AND IS_PRIMARY_KEY = 'FALSE') C5
                                ON C4.table_name = C5.table_name
                         ) UK    
    where table_name = 'DWG_PRODUCTION_VOLUME_TRX'
    UNION ALL
    SELECT REFERENCED_TABLE_NAME AS table_name,'FK' AS column_name, 9992,
    'ALTER TABLE DWG.'||TABLE_NAME||' ADD FOREIGN KEY ( '||COLUMN_NAME||' ) REFERENCES '|| REFERENCED_TABLE_NAME||'('||COLUMN_NAME||' ) ON UPDATE CASCADE ON DELETE RESTRICT;'
    FROM REFERENTIAL_CONSTRAINTS
    WHERE REFERENCED_TABLE_NAME = 'DWG_SITE'
    UNION ALL
    select TABLE_name,'tbl_ClmnDrop' column_name, 9995 as position, 'ALTER TABLE '|| schema_name ||'.'|| table_name ||' DROP (  DUMMY_CLMN );' as SQLCMD
    from tableS
    where  schema_name ='DWG'
      and TABLE_name ='DWG_PRODUCTION_VOLUME_TRX'
    order by position;

  • Extending a Cursor (for stored procedure)

    (Embedded image moved to file: PIC19643.PCX) Dan Christopher @ SUNLIFE
    03-13-97 04:39 PM
    I receive the following message when I try to extend a cursor for an
    execute of a stored procedure. I believe my problem has to do with using
    ODBC as my driver (to attach to a MS-SQL Server 6.5 database) , but does
    anyone have any other insight to what my problem may be.
    SYSTEM ERROR: Invalid state transition from FETCH to EXTENDED for statement of
    type qqdb_OdbcCursor.
    Class: qqdb_UsageException with ReasonCode: DB_ER_INVALIDSTATE
    Error #: [801, 152]
    Detected at: qqdb_Statement::ValidTransition
    Last TOOL statement: method w_connect.ExecStoredProc, line 53
    Error Time: Thu Mar 13 13:55:59
    Exception occurred (remotely) on partition "Dan_Connect_CL0_Part1",
    (partitionId = 210EC99B-811A-11D0-8D72-82F2A190AA77:0x22f:0x20, taskId =
    [210EC99B-811A-11D0-8D72-82F2A190AA77:0x23d:0x3.25]) in application
    "Forte
    Runtime", pid 314 on node 543SZAD in environment dusgroup.
    Here is a example of my code.
    constant NUM_ROWS_FETCH = 2; //default to fetch 50 rows
    //at a time.
    l_inputDataSet :DBDataSet = new; //input parameters for
    Forte
    l_statementtype :integer;
    l_return :integer; //return value for
    open/extend
    //cursor functions
    l_numRows :integer; //the number of rows fetch
    l_DBStatement :DBStatementHandle; //statement handle for
    sp
    l_statementtype = DB_CV_EXECUTE ;
    l_DBStatement = p_dbsession.Prepare(
    commandString = p_exec,
    inputDataSet = l_inputdataset,
    cmdType = l_statementtype);
    // fill in the parameter values
    for i in 1 to p_parameters.items do
    //integer parameter
    if (p_parameters.GetParmIndicator() = 'I') then
    l_inputdataset.SetValue(position = i,
    Value = p_parameters[i].GetParmValue().integervalue);
    else
    l_inputdataset.SetValue(position = i,
    Value = p_parameters[i].GetParmValue());
    end if;
    end for;
    //open the cursor
    l_return = p_dbsession.OpenCursor(
    StatementHandle = l_DBStatement,
    inputDataSet = l_inputdataset,
    resultDataSet = p_outputdataset);
    // Continue to Fetch and Extend the Cursor untill all rows have been
    retrieved.
    while (l_return != DB_RS_NONE) do
    l_numRows = p_dbsession.FetchCursor(
    StatementHandle = l_DBStatement,
    resultDataSet = p_outputdataset,
    maxRows = NUM_ROWS_FETCH);
    if (l_numRows = NUM_ROWS_FETCH) then //extend the cursor
    l_return = p_dbsession.ExtendCursor(
    StatementHandle = l_DBStatement,
    resultDataSet = p_outputdataset);
    else
    exit;
    end if;
    end while;
    //close the cursor
    p_dbsession.CloseCursor(statementHandle = l_DBStateMent);
    return l_numRows;

    Hi Dan,
    Thanks for the Calrification on Cursors, We solved it here.
    As for your Extend problem goes the Fetch should go outside the while
    loop I think.
    You first fetch and then get the next data set in a loop. I feel
    that this should solve your problem.
    Thankx
    Bala
    [email protected]
    Sage Solutions
    353 Sacramento
    Suite 1360
    San Francisco
    CA 94111.

  • Too many arguments for stored procedure call

    I have a stored procedure with 34 arguments, including the return value. I am trying to call it from java using JDBC thin drivers (jdk11, oracle815), but I get the "wrong number or types of arguments" error message. JDBC-OCI fails also. I saw a reference in this discussion group to there being a limit of 32 arguments for stored procedure calls from jdbc (posted 6/29/99). Is there such a limit? If so, is there a fix or workaround? If there is not a limit, how can I determine which argument is causing the problem?
    Many thanks.
    Mike
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'PUT_CHECK'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement
    .java)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java)
    at metris.quickcheck.database.DS1.main(DS1.java:79)
    null

    I must confess I still don't understand your problem. By rows ...
    I have an sql that recodes a column and has 1450 rows. This doesn't work
    although when I use the same with less rows 40-60 it works.... do you mean rows in the table or elements in the CASE() statement ?
    From the 9i SQL Reference:
    " The maximum number of arguments in a CASE expression is 255, and each WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices, you can nest CASE expressions. That is return_expr can itself be a CASE expression."
    According to the 10g docs the limit is the same there.
    Cheers, APC

  • Updatable ADO recordset returned by a stored procedure

    I am trying to have an updatable ADO recordset returned by a stored procedure.
    However, LockType for this recordset is always adLockReadOnly.
    What needs to be done to have LockType changed?
    I am using the following simplified example from Oracle doc. According to Oracle® Provider for OLE DB Developer's Guide 10g Release 2,
    the following ADO code sample sets the Updatability property on a command object to allow insert, delete, and update operations on the rowset object.
    Dim Cmd As New ADODB.Command
    Dim Rst As New ADODB.Recordset
    Dim Con As New ADODB.Connection
    Cmd.ActiveConnection = Con
    Cmd.CommandText = "SELECT * FROM emp"
    Cmd.CommandType = adCmdText
    cmd.Properties("IRowsetChange") = TRUE
    Cmd.Properties("Updatability") = 7
    ' creates an updatable rowset
    Set Rst = cmd.ExecuteHowever, the result is not updatable. Can you please advise.

    Returning a REF CURSOR is certainly the easiest of the options, particularly if you're trying to use ADO. Without doing something really klunky, all your options are going to result in read-only result sets.
    Assuming you have a procedure-based interface to your data, the easiest option is generally to do your own updates by explicitly calling the appropriate stored procedures.
    As a bit of an aside, in order to offer updatable result sets, the ODBC/ OLE DB/ etc provider generally has to do something along the lines of
    1) Take the SQL statement you pass in
    2) Modify it to select the ROWID in addition to the other columns you're selecting
    3) Store the ROWID internally and use that as a key to figure out which row to update
    Once you eliminate the ability of the client to manipulate the query, you've pretty well eliminated the ability of the driver to implement generic APIs for updates. The client at that point has no idea which row(s) in which table(s) a particular value is coming from, so it has no idea how to do an update. You generally have to provide that knowledge by coding explicit updates.
    Justin

  • How to use @prompt for stored procedure in universe

    Hi,
    I am using Bo XI R3.1 and universe was built on stored procedures and database is sql server 2005.
    I would like to show the list of values for prompts in report which they are based on parameters given for stored procedures in universe. Instead of typing the value for prompts the user should select some values for the prompt.
    I've tried in the universe putting the prompt syntax but didn't work could any one please let me know how this will be achived
    Thanks in advance,
    Eswar

    Hi Eswar,
    Please try the following steps mentioned below:
    1. Go to Insert -> click Tables and Import the table which needs to assign LOVu2019s into Universe panel.
    Objects which are created on tables may appear in inactive mode.
    2. Right click on the stored procedure -> Click on Edit stored procedures.
    3. Click on the Browse universe objects from Stored Procedure Editor. (Button avaial on the left)
    4. Select the object which you want to assign for the List of values.
    5. Enter the desired text which you want to display in the WebI reports in the Edit prompt Label.
    6. Export the Universe.
    Before doing the above steps:
    While creating for SP Univ, a parameter screen appears after selecting SP. In the "Value" field enter a dummy value and
    from the "Next Execution" drop down at the right select "Prompt me for a value".
    Regards,
    Rohit

  • Applying sort to a query returned by a stored procedure

    I am looking for some advice on the best approach for applying a dynamic sort to a query returned by a stored procedure.
    We have a stored procedure that has 3 inputs fields which are used to specify sort columns and it has an additional 3 fields to indicate if the corresponding input column is to be sorted in ascending or descending order. We presently accomplish this by using dynamic SQL in the procedure but this approach has some drawbacks. Ideally we would like these queries to compile just like any other cursor. We have tried using decodes but this does not seem practical or easy to maintain.
    This procedure is used by a web application that allows the user to click on a column header to specify their sort preference. The previous sort selection becomes the second sort field and the one before that the third.
    Your advice is much appreciated!

    I see, so you want to be able to sort by "name desc, age asc, salary asc", for example.
    there is no built in option. it's either dynamic sql, or decodes.
    the decodes could still work, with only 6 lines, but the problem is handling mixed data types. I'll stick with sort col of 1=name (char), 2=number_col, 3=date_col
    order by
      decode(sort_order1, 'A', decode (sort_col1, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order1, 'D', decode (sort_col1, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,
      decode(sort_order2, 'A', decode (sort_col2, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order2, 'D', decode (sort_col2, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,
      decode(sort_order3, 'A', decode (sort_col3, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order3, 'D', decode (sort_col3, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,Message was edited by:
    shoblock
    forgot to make 3 asc/desc variables

  • How to Change the return value for the parameters

    Hi, Can anyone help me with my problem?
    I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
    So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
    Is there a way to conditionally change the value depends which button is clicked?
    Any hint or help is highly appreciated!
    Hong

    try creating a plsql process which sets the P1_Projects item as required.
    in the plsql you can do:
    if :REQUEST = 'GO' then
    xxx
    else
    xxxx
    end if;
    set the condition to plsql expression:
    :REQUEST in ('GO', 'EXPORT')
    NB. the request value is usually set to the button name when a page is submitted from a button

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • Structure for Stored Procedure Call

    Hi All,
             Guys I am trying to call a stored procedure call using receiver jdbc adapter...
    This is the outgoing message:
    <b><?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:SP_DB xmlns:ns0="urn:sce-com:xi:dev:mohammf">
    - <Test>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">CC</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">XX</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
      </Test>
      </ns0:SP_DB></b>
    The error I am getting is: 
    <b><i>2007-08-20 09:44:05 Error Unable to execute statement for table or stored procedure. 'PP_TEST_P' (Structure 'Test') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error Exception caught by adapter framework: null
    2007-08-20 09:44:05 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !).</i></b>
    Pls advice..
    XIer
    Message was edited by:
            XIer

    Hi,
    Check your DATA TYPE attributes with the attributes of the column names in the Database table.  There is a mismatch between the DT and Table in the database.
    <b>Cheers,
    *RAJ*</b>

  • ALDSP 3.0 -- schema owner for stored procedure or SQL Statement

    Using ALDSP, I have a need to create a physical service based on a stored procedure or a SQL statement. I am wondering what will happen when I move to another deployment environment where the schema owner changes. In our QA and Prod environments, we have a different schema owner for all tables in the application (the DBAs believe this prevents unwanted updates to a prod environment). DSP elegantly supports this for normal table- and view-based physical services by mapping schemas through the DSP console after deployment. Will I get the same type of mapping capability for stored procedures and SQL statements? I noticed that I can add a SQL-based function to a physical service...is there a way to pass in the physical table name from that data service to the procedure or SQL statement?
    Thanks,
    Jeff

    Schema name substitution should work for stored procedures just like it does for tables. If it doesn't - report a bug.
    You don't get any help for sql-statement based data services - dsp doesn't parse the sql provided. One thing you could do is use the default schema (following the user of your connection pool), and not specify the schema in your sql-statement.

  • Return code for EXECUTE PROCEDURE (native SQL)

    Hi Experts,
    I've seen in the Note 364707 that the field %_ERRCODE is no longer supported since WAS 6.10 for stored procedures like this:
    EXEC SQL.
      EXECUTE PROCEDURE proc [(parameter list)] %_ERRCODE INTO :rc
    ENDEXEC.
    So an Upgrade to WAS 7.00 gives this programms an error.
    Has anybody an idea for an alternative?
    Regards,
    Stefan

    Hello Peluka,
    i have seen you have worked with 'execute procedure'.
    I want to execute a procedure with two Parameters and one structure. Example:
    EXECUTE PROCEDURE test.p_getdata ( in :i_ls_nr , in :vdatum , out :vtest ).
    vtest has the simple structure with field lieferscheinnr (char25).
    When i execute the procedure, i get the error <b>wrong number or types of arguments in call</b>.
    Do you know, whether execute procedure with structures is not possible?
    Thank you in advance.

  • [svn:fx-trunk] 11523: Fix return values for ASyncListView/setItemAt(), removeItemAt(): return failed items if they exist.

    Revision: 11523
    Author:   [email protected]
    Date:     2009-11-06 11:58:50 -0800 (Fri, 06 Nov 2009)
    Log Message:
    Fix return values for ASyncListView/setItemAt(),removeItemAt(): return failed items if they exist.
    QE notes:
    Doc notes:
    Bugs: sdk-24078
    Reviewer: Evtim
    Tests run: AsyncListView Mustella tests pass
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/sdk-24078
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/AsyncListView.as

Maybe you are looking for

  • How can I send many invoice documents to one customer in SAP B1?

    Hi Now I can send e-mail through sap b1 to customer by using outlook_integration add-on. But I want send many invoices to a customer in one email. Can I do it in sap b1? Thank u Theerawat

  • Which API to update supplier site VAT registration number?

    I am using the AP_VENDOR_PUB_PKG.Create_Vendor_SITE API call to populate the VAT_REGISTRATION_NUM field, whcih then appears as the "Default Reporting Registration Number" under the Tax Details page of the supplier screens. Unfortunately the call to A

  • HRMS Employee's Absence (Leave) Accrual Days

    Hello, I have implemented Oracle Global HRMS. I have created reports for leave balances and I need to show the current accrual for leave balances. The path for the leave value is:- On the People window, click on others, then select absence, Select An

  • How to reserve material for Internal order

    Hi, How to reserve material for Internal order? Please reply ASAP. Thanks & Regards, Pankaj

  • Changing the color of the link to the current page

    How can I change the link on the current page to display a different color until the user redirects to another page. I am wanting to keep all my links visible and simply change the color of the link that the user is on. I think I am going to use the