Version control of stored procedure

Dear Sir,
I'm using procedure builder to create stored procedures. However, when working in a team, there might be more than one person changing the same procedure at the same time and if update will definitely affect each other changes.
Therefore, does oracle has any tools that allows us to check out the stored procedure and as long as i have not check in the procedure, the other team member cannot update or read it.
Please advise.
thanks.

Hi,
Any body can give advice on this, please?
Thanks.

Similar Messages

  • Passing an array as parameter from java (java controls) to stored procedure

    Hi,
    I'm using java controls (BEA Weblogic Workshop 8.1) to call a stored procedure and send an array as a parameter to the stored procedure from java. The following code below throws an exception "Fail to convert to internal representation".
    Java code
    import com.bea.control.DatabaseControl.SQLParameter;
    // Here i create the java array
    int[] javaArray={12,13,14};
    //The code below is used to create the oracle sql array for the procedure
    SQLParameter[] params = new SQLParameter[1];
    Object obj0=javaArray;
    params[0] = new SQLParameter(obj0, oracle.jdbc.OracleTypes.ARRAY, SQLParameter.IN);
    // the code below calls the testFunc method in OJDBCtrl.jcx file
    String succ= dbControl.testFunc(params);
    OJDBCtrl.jcx
    * @jc:sql statement="call CMNT_TST_PROC(?))"
    String testFunc(SQLParameter[] param);
    The stored procedure used:
    TYPE SL_tab IS TABLE OF number INDEX BY PLS_INTEGER;
    Procedure cmnt_tst_proc (cmnt_tst sl_tab);
    Procedure cmnt_tst_proc (cmnt_tst sl_tab) is
    BEGIN
    dbms_output.put_line('Hello');
    END;
    I am getting the following exception
    Failure=java.sql.SQLException: Fail to convert to internal representation: [I@438af4 [ServiceException]>
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
    at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:861)
    at oracle.sql.ARRAY.toARRAY(ARRAY.java:210)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7768)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7449)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7837)
    at oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4587)
    at weblogic.jdbc.wrapper.PreparedStatement.setObject(PreparedStatement.java:244)
    at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(DatabaseControlImpl.jcs:1886)
    at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(DatabaseControlImpl.jcs:1732)
    at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(DatabaseControlImpl.jcs:2591)
    at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:249)
    at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:85)
    at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
    at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:109)
    at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:153)
    Can you please let me know, what i'm doing wrong and how i can pass an array to a procedure/function using java controls.
    Any help will be highly appreciated.
    Edited by: user12671762 on Feb 24, 2010 5:03 AM
    Edited by: user9211663 on Feb 24, 2010 9:04 PM

    Thanks Michael.
    Here's the final code that i used, this might be helpful for those who face this problem
    Java Code
    // Following code gets the connection object
    InitialContext ctx = new InitialContext();
    dataSource = (DataSource)ctx.lookup("<DataSourceName>");
    conn=dataSource.getConnection();
    // Following code is used to create the array type from java
    String query="CREATE OR REPLACE TYPE STR_ARRAY AS VARRAY(3) OF NUMBER";
    dbControl.runTypeQuery(query);
    // Following code is used to obtain the oracle sql array as SQLParameter
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("<schemaName>.STR_ARRAY", conn);
    Object[] elements = new Object[3];
    elements[0] = new Integer(12);
    elements[1] = new Integer(13);
    elements[2] = new Integer(14);
    oracle.sql.ARRAY newArray = new oracle.sql.ARRAY( desc, conn, elements);
    SQLParameter[] params = new SQLParameter[1];
    params[0] = new SQLParameter(newArray, oracle.jdbc.OracleTypes.ARRAY, SQLParameter.IN);
    String succ= dbControl.testFunc(params);

  • JDBC Control - Calling Stored Procedure

    Hi people,
    I have a big problem calling my procedure by jdbcControl, It might by easy to solve, but I don´t know what is wrong.
    My stored procedure return a Doube value, a key to be used in my system.
    Follow my Oracle procedure definition:
    --one cursor
    TYPE TCursor_Ret IS REF CURSOR;
    -- My procedure
    PROCEDURE PRSMS_RET_INVOKE_ID(pCURSOR OUT MY_PACKEGE.TCURSOR_RET) IS
    vNrChamadoServico sn_mensagem_portabilidade.nr_chamado_servico%TYPE; -- Number
    BEGIN
    -- THE IDENTIFICADOR HAS 15 digits
    vNrChamadoServico := FNSMS_BUSCA_VLR_PARAMETRO('0','IND_BASE_PORTAB') * power(10, 13);
    OPEN pCURSOR FOR
    SELECT (vNrChamadoServico + sq_nr_chamado_servico.NEXTVAL) AS invokeID
    FROM dual; -- retur '10000000000015'
    END PRSMS_RET_INVOKE_ID;
    In my JPD process I did something like this:
    public JdbcControl.SQLParameter[] parms = new JdbcControl.SQLParameter[1];
    --A cursor to be returned by oracle
    parms[0] = new JdbcControl.SQLParameter(new Double(0),Types.DOUBLE, JdbcControl.SQLParameter.OUT);
    myJdbcControl.getInvokeID(parms);
    In my jdbcControl I have:
    @JdbcControl.SQL(statement ="call MY_PACKAGE.PRSMS_RET_INVOKE_ID(?)")
    Double getInvokeID(JdbcControl.SQLParameter[] params)throws SQLException;
    And I got the following error:
    [BEA][Oracle JDBC Driver][Oracle]ORA-06553: PLS-306: wrong number or types of arguments in call to 'PRSMS_RET_INVOKE_ID'
    I am using the follow example:
    http://mail-archives.apache.org/mod_mbox/beehive-commits/200702.mbox/%[email protected]%3E
    I have Tried use as parameter LONG, NUMER, BIGDECIMAL and so one, but I haven't sucessfull. :(
    Could someone give me some hint?
    Edited by denimar at 06/10/2008 4:10 PM

    Hi guys,
    I Talked to my Oracle´s DBA and he give the the following advice:
    We changed the return TYPE.
    The old procedure returned TYPE TCursor_Ret IS REF CURSOR
    And now It return NUMBER
    FUNCTION FNSMS_RET_INVOKE_ID RETURN NUMBER IS
    vRESULT NUMBER;
    vCursor TCURSOR_RET;
    BEGIN
    PRSMS_RET_INVOKE_ID(vCursor);
    FETCH vCursor
    INTO vRESULT;
    RETURN(vRESULT);
    END FNSMS_RET_INVOKE_ID;
    Now I can catch the return value like this:
    select MY_PACKAGE.FNSMS_RET_INVOKE_ID from dual
    Bye bye!!

  • JDBC receiver adapter - stored procedure response

    I am on PI 7.11 and have the following scenario:
    RFC->PI->JDBC
    whereby the JDBC receiver access an Oracle db (unsure of that version) using a stored procedure "GET_ICBC_ID".
    My issue is that I never seem to have any data back in PI on the JDBC response coming back from Oracle. ***
    Here is the definition of that stored procedure in Oracle:
    Stored Procedure Name: GET_ICBC_ID
      Parameters
                    ICBCID    OUT VARCHAR2               <- Returned RACF ID (output)
                    REQUESTOR IN VARCHAR2 default 'SAPHR'       <- Optional Requestor ID.
                   COMMUNITY IN  VARCHAR2 default 'EMP'       <- Optional Community ID. 
    Here is my JDBC call in to the stored procedure (sxi_monitor), which seems to be fine:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_racf_req xmlns:ns1="http://sap.com/xi/Z_SkillSoft">
    - <Statement>
    - <GET_ICBC_ID action="EXECUTE">
      <REQUESTOR isInput="true" type="VARCHAR">SAPHR</REQUESTOR>
      <COMMUNITY isInput="true" type="CHAR">EMP</COMMUNITY>
      </GET_ICBC_ID>
      </Statement>
      </ns1:MT_racf_req>
    It appears as though the call into the JDBC is working, as the Oracle guys have shown me the logs (showing success) on the Oracle side.
    This is my sxi_monitor entry (of that response message):
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_racf_req_response xmlns:ns1="http://sap.com/xi/Z_SkillSoft">
      <Statement_response />
      </ns1:MT_racf_req_response>
    Also when I look at some of the message properties I see:
      <SAP:MessageSizePayload>0</SAP:MessageSizePayload>
      <SAP:MessageSizeTotal>13243</SAP:MessageSizeTotal>
      <SAP:PayloadSizeRequest>0</SAP:PayloadSizeRequest>
      <SAP:PayloadSizeRequestMap>0</SAP:PayloadSizeRequestMap>
      <SAP:PayloadSizeResponse>179</SAP:PayloadSizeResponse>
      <SAP:PayloadSizeResponseMap>149</SAP:PayloadSizeResponseMap>
    which I believe is saying that something came back in to PI as a response??  Not sure.
    My Message Type definition is:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/Z_SkillSoft" targetNamespace="http://sap.com/xi/Z_SkillSoft">
       <xsd:element name="MT_racf_req_response" type="DT_racf_req_response" />
       <xsd:complexType name="DT_racf_req_response">
          <xsd:sequence>
             <xsd:element name="Statement_response" type="DT_statement_response" />
          </xsd:sequence>
       </xsd:complexType>
       <xsd:complexType name="DT_statement_response">
          <xsd:sequence>
             <xsd:element name="ICBCID" type="xsd:string" />
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I have also tried inserting <row> between <Statement_response> and the ICBCID element.  Still no luck. 
    I suspect something is wrong with my response message type definition, but am not seeing it. Also, am unsure how I can debug this - it appears as though Oracle side is fine, but nothing back into PI.
    Any thoughts appreciated.
    Keith

    Thank you all for your response.  Some more info.:
    - The stored procedure is a SELECT, so am thinking I shouldn't need the <update_count> tags mentioned.  Let me know if this assumption is incorrect.
    - Because one field (ICBCID) is to be returned in the reponse, does it need to be passed in on the jdbc request ? Looking at the blogs I did not see them do that.  If so, with its IsOutput=true, or should it be IsInput=false or other? Also if it is to be passed in on the request, I guess I would set its value to a space so that the xml tag gets produced?
    - Does the order of the request elements passed matter, i.e. if the ICBCID is to be passed on the request, should it be first or last in the list?  Does order of the 2 IsInput=true parameters matter (i.e. in relation to the Stored Procedure)?
    - The Oracle version is 11.1, so pretty up-to-date.  Stored Procedures should work fine.
    - What specifically is meant be 'resultset'?  Also, does <row> need to be added as a tag within the response xml?
    Regards,
    Keith

  • How to debug a stored procedure in sql server 2012 ?

    whenever I do a change to a stored procedure and then run the alter proc again
    after that I place a break point on the exec stored procedure and try to step into the code 
    SQL management studio starts stepping into an older version of the stored procedure (i.e it does not feel the changes I made )
    How to get it to step through the latest version ? 

    Hi,
    Not sure what the exact problem is.. Refer the link below..
    http://stackoverflow.com/questions/8961600/debugging-does-not-show-current-stored-procedure-version
    Regards,
    Brindha.

  • Version Control

    I have RoboHelp HTML Version 7. We use RoboHelp for publishing our procedures; we use our Word documents for making reviews, updates, etc. and then just reimport and republish as necessary. Our company is asking us to use version control on our procedures. Since we cannot use the version control in RoboHelp, does anyone know of a version control app that can be used where we can import our docs from that app into RoboHelp? Version 7 only allows importing of Word, PDF, and HTML docs from folders on our computers or shared drives. I'm not sure if Version 8 has additional features.

    Hi Karen
    Attaching will not work. If you want to supply samples, you will need to make them available some other way such as Acrobat.com or YouSendIt.com.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcererStone Blog
    RoboHelp eBooks

  • How to add Stored Procedures to Version Control

    My system mainly relies on stored procedures and I recently noticed I don’t have the version control for my database.
    So, my question is: How can I add stored procedures to version control?

    Once you have a database in a SQL Server Database Project, integrating to Source control is the same as any Visual Studio project. First you configure Visual Studio to use TFS for Version Control:
    Then you can configure a workspace connected to a TFS server and add your projects to source control.
    See, eg
    Walkthrough: Exploring Team Foundation Version Control
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to call pl sql stored procedure or function in OAF 10 plus versions

    Hello All,
    I am using J-dev 10.1.3.3.0.3 version.I want to call stored procedure from package in one of my controller. I tried using "txn.createCallableStatement" but it is saying that createcallablemethod is not available.Does any one knows about this.
    Thanks

    Try the OA Framework Forum.
    John

  • Taking control back while calling stored procedure using java programme

    I have stored procedure to load data. This procedure is invoked by java program.
    The stored procedure take around 10 to 15 minutes to do complete loading of database. I want to write stored procedure when it starts loading of database at the same return the control to calling java programme so that java program can do other operation i.e. java program can not wait for control back from stored procedure.
    In short stored procedure runs in background and return control back to java program when stored procedure is invoked. Is it possible then How we can achieve this.

    U can acheive this using Java Threads. Create a thread submit this loading job. Once you submit the thread, you will get the control back to do other stuff.
    Documentation:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html
    -aijaz

  • Getting result set from stored procedures in database controls in weblogic

    I am calling a stored procedure from database control which actually returns a result set
    when i call the stored procedure like
    * @jc:sql statement="call PROC4()"
    ResultSet sampleProc() throws SQLException;
    it gives me exception saying
    "weblogic.jws.control.ControlException: Method sampleProc is DML but does not return void or int"
    I would appreciate any help
    Thanks,
    Uma

    Thanks for you reply!
    1) The stored procedure has head
    CREATE OR REPLACE PROCEDURE X_OWNER.DISPLAY_ADDRESS
    cv_1 IN OUT SYS_REFCURSOR
    AS
    err_msg VARCHAR2(100);
    BEGIN
    --Adaptive Server has expanded all '*' elements in the following statement
    OPEN cv_1 FOR
    Select ...
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    err_msg := SQLERRM;
    dbms_output.put_line (err_msg);
    ROLLBACK;
    END;
    If I only run select .. in DBArtisan, it display all 2030,000 rows in 3:44 minutes
    2) But when call stored procedure, it will take 80-100 minutes .
    3) The stored procedure is translated from sybase using migration tools, it's very simple, in sybase it just
    CREATE PROCEDURE X_OWNER.DISPLAY_ADDRESS
    AS
    BEGIN
    select ..
    The select part is exact same.
    4) The perl code is almost exact same, except the query sql:
    sybase verson: my $sql ="exec DISPLAY_ADDRESS";
    and no need bind the cursor parameter.
    This is batch job, we create a file with all information, and ftp to clients everynight.
    Thanks!
    Rulin

  • Multiple Stored Procedure Versioning

    Hi All,
    MS SQL Supports, Multiple SP Versions,
    Does oracle support automatic code translation, can it handle Multiple SP Versions ?
    Stored Procedure Version information: http://www.sqlservercentral.com/columnists/awarren/versioncontrolforstoredprocedures.asp
    We currently use versions any would like to convert our database to Oracle,
    will oracle automatically handle this and how ?
    Kind Regards,
    Dan.

    If those stored procedures are making DML calls against more-or-less the same data, you will be introduce contention.
    In a single instance (non-RAC) contention is within the SGA (buffer_cache, shared_pool, latches, enqueues). If the application is not scalable within the single instance, you will likely make performance worse when running it in RAC.
    So, you must first evaluate how it works (or would work) in a single instance database -- find out if it scalable merely by adding hardware. If it is scalable but your current hardware is limited, you can consider RAC. If it is not scalable and you have serialisation or contention, performance would be worse in RAC.
    Hemant K Chitale

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • Struts page control - stored procedure and refresh

    Hi Guys,
    I have a struts page with a read-only form that gets data from the database through a view - the contents of this table can change dynamically. There is a button on this page that allows me to refresh the page and see the current contents of the table.
    I also have another button on this page that calls a stored procedure which updates the table. However, when I click this, I also want the page to refresh so that I can see the results of the procedure's update - the page does refresh but displays the content of the table BEFORE the procedure ran.
    I have had a look at a javascript solution and it doesn't really fly.
    I think that what I need is a hook in the class that calls the stored procedure that also selects from the view. I think that, when the page refreshes after the procedure call, the new view contents will be displayed.
    Does anone have an idea as to how I go about this?
    TIA
    Steve

    "How to call PL/SQL Stored procedures" if you search the board will describe how to call a stored proc (or function) and get the result set into a scrollable jtable that is SIMILAR to the DAC gridcontrol.
    That isn't exactly what you asked... it isn't using the DAC gridcontrol.
    I'd be interested in seeing how someone did the latter.
    Hopefully the JDEV team are well acquanted with how folks develope using Reports and Forms and can apply the capabilities there ( like getting results from stored procs into via toolset for programmer use ) to the DAC controls and rollover such existing capabilities into Jdev in the future.
    null

  • Strange error on stored procedure after update to version 7.6.06.10

    Hi,
    in past version MaxDB 7.6.03 i created a stored procedure with follow SQL statement inside:
    TRY
                SELECT SUM(QTDE) QTDE_SAIDA
                   FROM VENDOR_CONCES.MVIEW_MOVPRODUTOS mviewS
                   WHERE mviewS.MY_EMPRESA = :OID_EMPRESA AND
                         mviewS.MY_PRODUTO_DEF = :OID_PRODUTO_DEF AND
                         mviewS.GERA_ESTOQUE = 'S' AND
                         mviewS.TIPO = 'S' AND
                         mviewS.DATA BETWEEN :MAX_DATA_ESTOQUE_INICIAL AND :DTA_ESTOQUE AND
                         EXISTS(SELECT * FROM VENDOR_CONCES.MVIEW_MOVPRODUTOS mviewE WHERE 
                            mviewE.my_Empresa = mviewS.my_Empresa AND
                            mviewE.tipo = 'E' AND
                            mviewE.data <= mviewS.data AND
                            mviewE.my_Produto = mviewS.my_Produto AND
                            mviewE.gera_Estoque = 'S' AND
                            mviewE.gera_Financeiro != 'N'
                FETCH INTO :QTDE_SAIDA;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error ao contar Saidas');
    if execute that procedure with new version 7.6.06.10 i get an error:
    (at 1834): Data types must be compatible.
    the line of error is this:
    mviewS.DATA BETWEEN :MAX_DATA_ESTOQUE_INICIAL AND :DTA_ESTOQUE AND
    if i remove the EXISTS part that procedure works, but i need to use EXISTS there.
    ps: MVIEW_MOVPRODUTOS is a table, not a view, i preceed tables with MVIEW for tables created by triggers, to simulate Materialized Views.
    ps2: DATA field is DATE field on english.
    any idea what can be wrong?
    best regards.
    Clóvis

    Hi, Elke
    you are right, changing SELECT * to SELECT oid works, follow the full procedure with changes:
    CREATE DBPROC SP_ESTOQUE_ATUAL_DATA_PROD_DEF (
        IN OID_EMPRESA VARCHAR(8),
        IN OID_PRODUTO_DEF VARCHAR(8),
        IN DTA_ESTOQUE TIMESTAMP,
        OUT ESTOQUE_ATUAL VARCHAR(200))
    AS
        VAR MAX_DATA_ESTOQUE_INICIAL TIMESTAMP;
            QTDE_ESTOQUE_INICIAL FIXED(10,3);
            QTDE_SAIDA FIXED(10,3);
            QTDE_ENTRADA FIXED(10,3);
        BEGIN
            TRY
                SELECT MAX(DATA) MAX_DATA_ESTOQUE_INICIAL
                   FROM VENDOR_CONCES.ESTOQUEINICIAL
                   WHERE MY_EMPRESA = :OID_EMPRESA AND
                       MY_PRODUTO = :OID_PRODUTO_DEF AND
                       DATA <= :DTA_ESTOQUE;
                FETCH INTO :MAX_DATA_ESTOQUE_INICIAL;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error em MAXDATAEINI');
            TRY
                IF MAX_DATA_ESTOQUE_INICIAL IS NULL THEN BEGIN
                    SET MAX_DATA_ESTOQUE_INICIAL = '1900-01-01 00:00:00.000';
                    SET QTDE_ESTOQUE_INICIAL = 0;
                END ELSE BEGIN
                    SELECT QTDE QTDE_ESTOQUE_INICIAL
                       FROM VENDOR_CONCES.ESTOQUEINICIAL
                       WHERE MY_EMPRESA = :OID_EMPRESA AND
                           MY_PRODUTO = :OID_PRODUTO_DEF AND
                           DATA BETWEEN :MAX_DATA_ESTOQUE_INICIAL AND :DTA_ESTOQUE;
                    FETCH INTO :QTDE_ESTOQUE_INICIAL;
                END;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error em Carregamento do Estoque Inicial');
            TRY
                SELECT SUM(QTDE) QTDE_SAIDA
                   FROM VENDOR_CONCES.MVIEW_MOVPRODUTOS mviewS
                   WHERE mviewS.MY_EMPRESA = :OID_EMPRESA AND
                         mviewS.MY_PRODUTO_DEF = :OID_PRODUTO_DEF AND
                         mviewS.GERA_ESTOQUE = 'S' AND
                         mviewS.TIPO = 'S' AND
                         mviewS.DATA BETWEEN :MAX_DATA_ESTOQUE_INICIAL AND :DTA_ESTOQUE AND
                         EXISTS(SELECT oid FROM VENDOR_CONCES.MVIEW_MOVPRODUTOS mviewE WHERE 
                            mviewE.my_Empresa = mviewS.my_Empresa AND
                            mviewE.tipo = 'E' AND
                            mviewE.data <= mviewS.data AND
                            mviewE.my_Produto = mviewS.my_Produto AND
                            mviewE.gera_Estoque = 'S' AND
                            mviewE.gera_Financeiro != 'N'
                FETCH INTO :QTDE_SAIDA;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error ao contar Saidas');
            TRY
                IF QTDE_SAIDA IS NULL THEN
                    SET QTDE_SAIDA = 0;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error ao zerar saida');
            TRY
                SELECT SUM(QTDE) QTDE_ENTRADA
                   FROM VENDOR_CONCES.MVIEW_MOVPRODUTOS
                   WHERE MY_EMPRESA = :OID_EMPRESA AND
                       MY_PRODUTO_DEF = :OID_PRODUTO_DEF AND
                       GERA_ESTOQUE = 'S' AND
                       TIPO = 'E' AND
                       DATA BETWEEN :MAX_DATA_ESTOQUE_INICIAL AND :DTA_ESTOQUE;
                FETCH INTO :QTDE_ENTRADA;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error ao contar entradas');
            TRY
                IF QTDE_ENTRADA IS NULL THEN
                    SET QTDE_ENTRADA = 0;
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error ao zera entrada');
            TRY
                SET ESTOQUE_ATUAL = CHR(QTDE_ESTOQUE_INICIAL + QTDE_ENTRADA - QTDE_SAIDA);
            CATCH
                IF $rc <> 100 THEN STOP ($rc, 'unexpected error');
        END;
    about the error, I discovered the line using database studio, as I droped the old procedure and tried to recreate, database studio says that error is at BETWEEN expression, but you find the right problem with select * in exists.
    best regards
    Clóvis

  • How do I submit to stored procedure with dynamic number of controls on page

    I need to submit to a stored procedure from a dynamic page that has a variable number of controls. In the past I have always had a procedure that took 1 input parameter for each control. Now I will not know how many controls are on the form.
    Is it possible to submit some type of parameter array?
    Thanks,

    Hi,
    To declare a bind variable in SQL*Plus, use the SQL*Plus VARIABLE command with a data type:
    SQL> VARIABLE  n   NUMBEROr you could change your code so that it uses the local variable n instead of the bind variable by removing the ":"
    DECLARE
        v_new_jobno BINARY_INTEGER;
        n number;
    BEGIN
        DBMS_JOB.SUBMIT (n
            ,job => v_new_jobno
            ,what => 'spMyTest(null,null,n);'
            ,next_date => sysdate
            ,interval => 'sysdate + 1');
        commit;
    END;
    /

Maybe you are looking for

  • Issue with keychain access in Safari

    Hello everyone! I have a strange problem. After I used the migration assistant in Mac OS X 10.5.6 my keychain has all my old passwords etc. but Safari doesnt fill the password field. It only fills the name of the user. For example I visit a webpage w

  • Can I upgrade iPad 1 from ios5 to ios6

    Have had my iPad 1 for some time now, I understand that I can upgrade from ios5 to ios 6, this is so confusing could do with some really basic instruction on how to do this.

  • Multiple receiver without condition

    hi,   I hava a scenario of multiple receiver without the condition. I used 2 send step but i don't find any parameters in send step to specify the receiver channel in send step. Please let me know whether to specify it. regards, Dhil

  • Why my iPhone5C is getting Hang after updating to iOS8?

    After updating to iOS8 my iPhone5C is getting Hang Frequently once or twice a day. Please fix this problem releasing stable OS. Not only I am having same problem some of my friends having iPhone5C and 5S are also having same. Please release iOS8.0.1

  • Integrating third party system

    hi, I have a requirement - when i press F4 in a standard SAP transaction I have to get the values from the third party system. Please let me know if we can do this using BAPI or not. If yes whats the procedure. Any help will be appreciated. Thanks!