Regarding Restrictions on calling functions from sql expressions

Hi all,
While going through the functions of oracle 9i plsql documentation i came across restrictions on calling a function, i that i did not understand the following statement. can anyone explain me with an example. Please.........
Functions called from SQL statements cannot contain statements that end the transactions.
Regards,
Sri Ram.

Some where from google
http://www.ucertify.com/article/what-are-the-restrictions-on-a-user-defined-function-that-is-called-from-a-sql-expression.html
>
•The function cannot contain statements that end the transaction. For example, the function cannot contain transaction control statements (such as COMMIT), session control statements (such as SET ROLE), or system control statements (such as ALTER SYSTEM). Also, it cannot contain DDL statements (such as CREATE) because they are followed by an automatic COMMIT.

Similar Messages

  • Getting session hang When calling Function from SQL query

    Hi All,
    I am using Oracle 8.1.7.4.0. I have a fucntion in a Package and I am calling it from the SQL query. When I am firing the query my oracle session is going to hang position and I am not able to any thing. I have to kill the session.
    But this same thing is working fine in Oracle 9.i.
    There are no out parameter and no DML, DDL and DCL statement in this fucntion.
    Could you please get back me what is the problem on it.
    Regards
    SUN

    Check why your session hangs.
    Just a few ideas:
    * Blocking locks?
    * Endless loop?
    * Performance (maybe it is just slow in orac8i and you have to wait a bit longer). Check the execution plans of the SQL statements in your function.
    * Don't use a function, but direct SQL, it is faster in both versions.

  • Calling function from sql folder vs report

    Hi,
    A report based on a custom sql folder is taking a long time to run. One of the things that I noticed is that when I run the sql in plsql it takes a long time, but if I remove the row where I call a function, it runs pretty quickly.
    In general, is there a difference between running a function from the sql custom folder and calling it from the report itself?
    Thanks.
    Leah

    Hi Tamir,
    I might check out the execution plans, but truthfully, understanding the plans and the meaning of the differences is not my strong point.
    I thought that maybe there was some general rule that, for instance, it is better to keep functions out of the sql folder and use them in a condition in the report itself, or the opposite, or that maybe it makes no difference at all.
    I appreciate the response.
    Thanks.
    Leah

  • Calling a function from SQL prompt that returns a record

    Hi,
    I've been trying to execute a function that is present on a different database. for eg. I am loged on to a database say 'A' and trying to execute a function present in database 'B'. this function is present in a package 'X' which has 2 functions and two procedures. From the packages i am able to execute the two procedures and one of the function.
    So i guess it is not a problem with the access permissions. The function that i am trying to call say function I has got 3 OUT
    parameters and 1 IN parameter. the Function returns a record. When i try to execute this function i get an error. Can you please let me know as to how exactly i need to call this function from the SQL prompt...
    thanx in advance
    null

    Hi Anand,
    As your function has 3 OUT parameters and it returns a record you can not just call it from SQL Plus. You need to write small PL/SQL program and use variables to hold the OUT values and the returned record.
    Good Luck,
    RajKiran
    null

  • How to Call Function from SAPSCRIPT

    I want to Call a function from my SAPSCRIPT to get some data and print the same in the form , Can I get an example for this

    Hi Nandan,
    U cannot directly call function from SAPScript... For that u have to create one include in which u need to write the code. Using Perform... EndPerform u can call the same from SAPScript. See the below example
    u need to write this code in SAPScript
    PERFORM formname IN PROGRAM includename
    USING &field1&                                      
    USING &field2&                                      
    CHANGING &field3&                                     
    ENDPERFORM                                               
    Here includename is your include type program.
    u need to write this code in your include type program..
    FORM formname TABLES in_par STRUCTURE itcsy
                            out_par STRUCTURE itcsy.
    data : var1 like field1,
           var2 like field2,
           var3 like field3.
      READ TABLE in_par WITH KEY 'field1'.
      CHECK sy-subrc = 0.
      var1 = in_par-value.
      READ TABLE in_par WITH KEY 'field2'.
      CHECK sy-subrc = 0.
      var2 = in_par-value.
    now u can call corresponding function using local VAR1 and VAR2. Here u can pass N no of USING parameters.
    After processing on VAR3...
      READ TABLE out_par WITH KEY 'field3'.
      out_par-value = VAR3.
      MODIFY out_par INDEX sy-tabix.
    EndForm.
    Here in_par and out_par are the structures which will be used to communicate with SAPScript. And this is the only way as per my view.
    I m sure this code will work fine. Here i have used dummy variables that u need to change as per your requirement. If u have more queries write me back.
    And yes if this works than dont forget to give the points.
    Regards,
    Sagar

  • Call function from data base with clob input parameter.

    Hello,
    In this project I use Jdev 11g.
    I call function from database.
    create or replace function get_fa_list (
    p_fa_id_list in clob
    return sys_refcursor
    is
    vCursor sys_refcursor;
    begin
    put_msg ('begin');
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;
    put_msg ('Save');
    open vCursor for
    select rownum as id, s.*
    from (
    select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
    from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
    where f.ext_system = 'BI' and
    f.ext_sys_id = l.column_value
    group by f.latitude, f.longitude
    ) s;
    put_msg ('Open and End');
    return vCursor;
    end get_fa_list;
    I use TopLink in ejb.
    i use follow code for call function and get result.
    public List<TmpResPoints> findAllPointsBI(String p_id){
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.beginEarlyTransaction();
    StoredFunctionCall call = new StoredFunctionCall();
    call.setProcedureName("get_fa_list");
    call.useUnnamedCursorOutputAsResultSet();
    ClobDomain c = new ClobDomain(p_id);
    //System.out.println(c.toString());
    call.addNamedArgumentValue("p_fa_id_list", c);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(TmpResPoints.class);
    query.setCall(call);
    List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
    uow.commit();
    uow.release();
    return result;
    But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;)
    How I can call this function from dataBase and get result?
    thx,
    Demka.

    What is the SQL generated?
    The argument should just be the Clob value (a String) not the domain object.
    Also try addNamedArgument, and then pass the named argument to the query.
    James : http://www.eclipselink.org

  • Entity Object (EO) issue using "Derived from SQL Expression" funtionality

    I am using JDeveloper 11.1.1.6
    In my use case I am trying to get my EO to return results from a query such as the following:
                   SELECT table1.my_id,table1.my_des,
                   count(table2.store_num) as storeCount
                   FROM table1
                   LEFT JOIN table2
                   ON table1.my_id = table2.my_id
                   group by table1.my_id,table1.my_des
    I have chosen to follow the path described in the following URL:
    http://www.exploreoracle.com/2010/09/07/using-transient-attribute-with-derived-from-sql-expression-in-jdeveloper-11g/
    To begin with, I created my EO's and VO's by using the "Business Components from Tables" wizard. This created EO and VO's for my 2 tables based on the DB schema.
    I added the VO's to an app module and tested both VO's. I was able to navigate both VO's.
    I then crreated a new attribute for the table1 EO. Please note that table1 does include 7 fields prior to this field therefore this becomes the 8th field. That is important once you get to the exception being thrown. The XML is as follows
              <Attribute
              Name="StoreCount"
              IsUpdateable="false"
              IsQueriable="false"
              IsPersistent="false"
              Precision="5"
              Scale="0"
              ColumnName="STORECOUNT"
              SQLType="NUMERIC"
              Type="oracle.jbo.domain.Number"
              ColumnType="NUMBER"
              Expression="(select coalesce(count(*),0) as StoreCount from table2 where my_id = table1.my_id)">
              <Properties>
              <SchemaBasedProperties>
                   <LABEL
                   ResId="STORE_COUNT"/>
              </SchemaBasedProperties>
              </Properties>
              </Attribute>
    I then tested the VO's again in the app module and everything continues to work fine.
    I then added the new attribute to the VO by doing "Add Attribute from Entity".
    I then tested the VO for Table1 and now get the following error. Could you please advise me as to what I might be doing wrong.
    [132] oracle.jbo.AttributeLoadException: JBO-27021: Failed to load custom data type value at index 8 with java object of type oracle.jbo.domain.Number due to java.sql.SQLException.
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1375)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2536)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3885)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2555)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6044)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5822)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3068)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2785)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1259)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1060)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2810)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
         at oracle.adf.model.binding.DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:779)
         at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:679)
         at oracle.jbo.uicli.binding.JUIteratorBinding.refreshControl(JUIteratorBinding.java:474)
         at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4474)
         at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:347)
         at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1605)
         at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:116)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:88)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:71)
         at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:63)
         at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:98)
         at oracle.jbo.jbotester.form.JTForm.<init>(JTForm.java:72)
         at oracle.jbo.jbotester.form.BindingForm.<init>(BindingForm.java:50)
         at oracle.jbo.jbotester.form.FormType$1.createForm(FormType.java:63)
         at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
         at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:140)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:123)
         at oracle.jbo.jbotester.tree.ObjTreeNode$ShowAction.doAction(ObjTreeNode.java:399)
         at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:97)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:113)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1326)
         ... 81 more
    ## Detail 0 ##
    java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:113)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1326)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2536)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3885)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2555)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6044)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5822)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3068)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2785)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1259)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1060)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2810)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
         at oracle.adf.model.binding.DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:779)
         at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:679)
         at oracle.jbo.uicli.binding.JUIteratorBinding.refreshControl(JUIteratorBinding.java:474)
         at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4474)
         at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:347)
         at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1605)
         at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:116)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:88)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:71)
         at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:63)
         at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:98)
         at oracle.jbo.jbotester.form.JTForm.<init>(JTForm.java:72)
         at oracle.jbo.jbotester.form.BindingForm.<init>(BindingForm.java:50)
         at oracle.jbo.jbotester.form.FormType$1.createForm(FormType.java:63)
         at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
         at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:140)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:123)
         at oracle.jbo.jbotester.tree.ObjTreeNode$ShowAction.doAction(ObjTreeNode.java:399)
         at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:97)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    [133] JUErrorHandlerDlg.reportException(oracle.jbo.AttributeLoadException)
    [134] LoadFromResultSet failed (8)
    [135] DCBindingContainer.reportException :oracle.jbo.AttributeLoadException
    [136] oracle.jbo.AttributeLoadException: JBO-27021: Failed to load custom data type value at index 8 with java object of type oracle.jbo.domain.Number due to java.sql.SQLException.
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1375)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2536)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3885)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2555)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6044)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5822)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
         at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:2258)
         at oracle.jbo.uicli.binding.JUIteratorBinding.internalGetCurrentRowInBinding(JUIteratorBinding.java:500)
         at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:2203)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.internalCheckPermission(JUCtrlActionBinding.java:2050)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:325)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:296)
         at oracle.jbo.uicli.controls.JUNavigationBar._isEnabled(JUNavigationBar.java:1342)
         at oracle.jbo.uicli.controls.JUNavigationBar._updateButtonStates(JUNavigationBar.java:1331)
         at oracle.jbo.jbotester.NavigationBar._updateButtonStates(NavigationBar.java:99)
         at oracle.jbo.uicli.controls.JUNavigationBar$3.run(JUNavigationBar.java:1246)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.Dialog$3.run(Dialog.java:1098)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1096)
         at java.awt.Component.show(Component.java:1585)
         at java.awt.Component.setVisible(Component.java:1537)
         at java.awt.Window.setVisible(Window.java:842)
         at java.awt.Dialog.setVisible(Dialog.java:986)
         at oracle.jbo.uicli.controls.JUErrorDialog.showError(JUErrorHandlerDlg.java:289)
         at oracle.jbo.uicli.controls.JUErrorHandlerDlg$1myRunnable.run(JUErrorHandlerDlg.java:370)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:113)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1326)
         ... 60 more
    ## Detail 0 ##
    java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:113)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1326)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2536)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3885)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2555)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6044)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5822)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
         at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:2258)
         at oracle.jbo.uicli.binding.JUIteratorBinding.internalGetCurrentRowInBinding(JUIteratorBinding.java:500)
         at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:2203)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.internalCheckPermission(JUCtrlActionBinding.java:2050)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:325)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:296)
         at oracle.jbo.uicli.controls.JUNavigationBar._isEnabled(JUNavigationBar.java:1342)
         at oracle.jbo.uicli.controls.JUNavigationBar._updateButtonStates(JUNavigationBar.java:1331)
         at oracle.jbo.jbotester.NavigationBar._updateButtonStates(NavigationBar.java:99)
         at oracle.jbo.uicli.controls.JUNavigationBar$3.run(JUNavigationBar.java:1246)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.Dialog$3.run(Dialog.java:1098)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1096)
         at java.awt.Component.show(Component.java:1585)
         at java.awt.Component.setVisible(Component.java:1537)
         at java.awt.Window.setVisible(Window.java:842)
         at java.awt.Dialog.setVisible(Dialog.java:986)
         at oracle.jbo.uicli.controls.JUErrorDialog.showError(JUErrorHandlerDlg.java:289)
         at oracle.jbo.uicli.controls.JUErrorHandlerDlg$1myRunnable.run(JUErrorHandlerDlg.java:370)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    The Is Updatable attribute on the EO is false which I assume is the same as never. Here is the current config for it:
    <Attribute
    Name="StoreCount"
    IsUpdateable="false"
    IsQueriable="false"
    IsPersistent="false"
    Precision="5"
    Scale="0"
    ColumnName="STORECOUNT"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    Expression="(select coalesce(count(*),0) as StoreCount from table2 where my_id = table1.my_id)">
    <Properties>
    <SchemaBasedProperties>
    <LABEL
    ResId="STORE_COUNT"/>
    </SchemaBasedProperties>
    </Properties>
    </Attribute>
    This attribute is in the same order in the VO and it is in the EO. The VO code is as follows:
    <ViewAttribute
    Name="StoreCount"
    IsUpdateable="false"
    IsQueriable="false"
    IsPersistent="false"
    PrecisionRule="true"
    EntityAttrName="StoreCount"
    EntityUsage="MyTable2EO"/>
    The VORowImpl has the attributes in the same order as well.
    Do you have any additional suggestions.

  • Send data to ECC table through RFC Call function from SAP B1 via  b1if

    Hi,
    I have created scenario in B1if which triggers from SAP B1, now I have to send this data in to ECC table, so I have created scenario for that with inbound SAP B1, outbound void and in process RFC Call atom is there but I am not getting data in receiver and also how to write xml to send data in RFC function. Function for RFC has configured from ECC end and have access of that function.
    So please help me to send data to ECC table through RFC Call function from SAP B1 (9.0) via b1if
    Thanks

    Solved by my own.

  • Moving from SQL Express to SQL Server

    Our Robosource Control v3.1 database just hit the 4GB limit with SQL Express. Could anyone pass along any advice for changing to from SQL Express to SQL Server 2008?
    Many Thanks!

    I don't have any direct experience with this, as we started off with SQL server. However, there's a promising-looking feature that might help you: the RoboSource Convert wizard (RSO3ConvertWizard.EXE), which you can get to from the Start menu. There's a selection in the Convert wizard for a 3.1 to 3.1 database copy--I'm guessing that would be what you want.
    HTH,
    G

  • Entity DATE type attribute : Derieved From SQL Expression for date format

    Hi,
    I want to set one of the Entity's Date Attribute with specific format , for e.g DD-MM-YYYY
    I see a Derieved From SQL Expression checkbox, how can I define the SQL Expression
    can I use TO_DATE(EMP_START_DATE,'DD-MM-YYYY'), I want to insert a date in that format, when I am creating a row using viewObject.createRow()
    Java Type is oracle.jbo.domain.Date which take YYYY-MM-DD as a string, I do not want to use this format
    Thanks,

    Here is a solution, but I am sure it is not the best one. It will work in a hurry. Maybe you can create a helper method to generalize this conversion until something more succinct comes along for US:
    This code assumes an import of jbo.oracle.domain.Date.
        public void updateDateTest () {
            AddressesViewImpl lVO = (AddressesViewImpl)this.getAddressesView1();
            AddressesViewRowImpl lRow = (AddressesViewRowImpl)lVO.first();
            System.out.println("create date for current record is currently: " +
                               lRow.getCreationDate());
            java.util.Date today = new java.util.Date();
            SimpleDateFormat dateFormat =
                new SimpleDateFormat("dd-MM-yyyy");
            SimpleDateFormat jboDateFormat =
                new SimpleDateFormat("yyyy-MM-dd");
            String lSampleDateString = "15-04-2010";
            java.util.Date lSampleDate = null;
            try {
                lSampleDate = dateFormat.parse(lSampleDateString);
            } catch (ParseException e) {
                System.out.println("Parsing exception thrown:  " + e.getMessage() +
                                   "\n ==> caused by \n==>"+ e.getCause().getMessage());
                lRow.setCreationDate(new Date(jboDateFormat.format(lSampleDate)));
            System.out.println("about to commit; create date for current record is currently: " +
                               lRow.getCreationDate());
            this.getDBTransaction().commit();
            System.out.println("resetting to some other date; create date for current record is currently: " +
                               lRow.getCreationDate());
                lRow.setCreationDate(new Date(jboDateFormat.format(today)));
            this.getDBTransaction().commit();
        }I defined this code in my Application Module Impl file and ran it with the BC tester. Here was its output:
    Mar 18, 2010 8:27:54 AM oracle.jbo.jbotester.MainFrame main
    INFO: BC4J Tester started.
    Source breakpoint occurred at line 66 of FusionExperimentsAMImpl.java.
    create date for current record is currently: 2009-02-02 12:09:54.0
    about to commit; create date for current record is currently: 2010-04-15
    resetting to some other date; create date for current record is currently: 2010-04-15I spent a little time looking around the forum for additional solutions. I think several years ago I even wrote a blog entry on this subject. If I remember how to do this right I will amend with more information.

  • Calling a BOOLEAN returning function from SQL

    Hello All,
    I have created below function which return BOOLEAN value :
    CREATE OR REPLACE FUNCTION FUNC_1
    P_EMPID IN emp.empno%type
    )RETURN BOOLEAN
    AS
    L_VAR NUMBER;
    BEGIN
    SELECT 1 INTO L_VAR
    FROM EMP
    WHERE EMPNO = P_EMPID;
    IF L_VAR = 1 THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END;Now I want to call this function from SELECT but I know that SQL does not support BOOLEAN value so I tried in other way i.e. via CASE
    SELECT CASE FUNC_1(7788)
           WHEN TRUE THEN 'TRUE'
           WHEN FALSE THEN 'FALSE'
           ELSE 'NULL'
           END CASE
    FROM DUALBut it is giving me error "ORA-00904: "FALSE": invalid identifier'
    How can I achieve this ?
    Thanks & Regards,
    Rakesh

    Hi Rakesh,
    Why cant you try something like this, When BOOLEAN type is not supported in SQL.
    Here I have made the return value a number. And, at case comparison, we get the BOOLEAN
    result as TRUE of FALSE.
    CREATE OR REPLACE FUNCTION func_1 (p_empid IN emp.empno%TYPE)
       RETURN NUMBER
    AS
       l_var   NUMBER;
    BEGIN
       SELECT count(*)
         INTO l_var
         FROM emp
        WHERE empno = p_empid;
       IF l_var = 1
       THEN
          RETURN 1;
       ELSE
          RETURN 0;
       END IF;
    END;And,
    SELECT CASE func_1 (55656)
              WHEN 1
                 THEN 'TRUE'
              WHEN 0
                 THEN 'FALSE'
           END
      FROM DUAL;Which return TRUE if the Employee Number Exists and FALSE if doesnot.
    Thanks,
    Shankar.

  • Calling function from PL/SQL block

    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?

    user610868 wrote:
    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?Hello
    A very very basic thing to do when you get an error is to include details of it. That helps narrow it down from one of the 1000s of potential Oracle errors it could be.
    Anyway, a function returns a value, and in PL/SQL you need to capture that otherwise you'll get "an error". Modify your code like so
    DECLARE
       l_Test1Val     VARCHAR2(4000); --CHANGE THIS TO BE THE SAME AS THE RETURN TYPE FOR YOUR FUNCTION
    BEGIN
       l_Test1Val :=  TEST1(1202);
    END;HTH
    David
    Edited by: Bravid on Oct 25, 2011 3:57 PM
    removed a ;

  • Calling a function from sql*plus

    I can call my procedure from sql *plus
    by doing
    sql>call Proc_name(x,y);
    How do you call a function?
    null

    John,
    I think moifying the statement
    CREATE OR REPLACE PROCEDURE "OGUSER"."OGX1" (user_county in integer, user_permit in integer )
    TO
    CREATE OR REPLACE FUNCTION "OGUSER"."OGX1" (user_county in integer, user_permit in integer ) return NUMBER is
    AND before end you will have to add a return statement
    (Probably
    return 0;
    exception
    when others then
    return 1;
    end;
    This will change your procedure to a function but I am not sure you'll be able to see your dbms_output's, if you call the function using select ...
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by john saucer ([email protected]):
    I want to turn my procedure into a function.
    So I can call it with a select statement.
    I'm kind of having problems with the return statement at the top and bottom.
    I don't quite understand how to declare the type in the return. My procedure calculates 2 pl/sql tables....
    My procedure looks like.
    CREATE OR REPLACE PROCEDURE "OGUSER"."OGX1" (user_county in integer, user_permit in integer )
    as
    i integer :=0;
    j integer :=0;
    type dept_table_type is table of ogxtest%rowtype
    index by binary_integer;
    type dept2_table_type is table of ogxtest%rowtype
    index by binary_integer;
    my_dept_table dept_table_type;
    my_dept2_table dept2_table_type;
    v_cotemp number := user_county;
    v_permittemp number := user_permit;
    v_origcotemp number := user_county;
    v_origpermittemp number := user_permit;
    v_count number(2) :=1;
    v_count2 number(2) := 1;
    v_oldcount number(2) :=1;
    v_oldcount2 number(2) := 1;
    begin
    select count(*) into v_count from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    select count(*) into v_oldcount from ogxtest where nco=v_cotemp and npermit=v_permittemp;
    while v_count >= 1 LOOP
    i := i+1;
    v_count2 := v_count2 +1;
    select *
    into my_dept_table(i)
    from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    v_cotemp := my_dept_table(i).nco;
    v_permittemp := my_dept_table(i).npermit;
    select count(*) into v_count from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    end loop;
    while v_oldcount >= 1 LOOP
    j := j+1;
    v_oldcount2 := v_oldcount2 +1;
    select *
    into my_dept2_table(j)
    from ogxtest where nco=v_origcotemp and npermit=v_origpermittemp;
    v_origcotemp := my_dept2_table(j).oco;
    v_origpermittemp := my_dept2_table(j).opermit;
    select count(*) into v_oldcount from ogxtest where nco=v_origcotemp and npermit=v_origpermittemp;
    end loop;
    for i in 1..v_count2-1
    loop
    dbms_output.put_line(' reassigned to - orig county ' | |my_dept_table(i).oco | | ' orig permit ' | |my_dept_table(i).opermit| | ' new county ' | |
    my_dept_table(i).nco | | ' new permit ' | |my_dept_table(i).npermit );
    end loop;
    for j in 1..v_oldcount2-1
    loop
    dbms_output.put_line(' reassigned from - orig county ' | |my_dept2_table(j).oco | | ' orig permit ' | |my_dept2_table(j).opermit| | ' new county ' | |
    my_dept2_table(j).nco | | ' new permit ' | |my_dept2_table(j).npermit );
    end loop;
    end;
    <HR></BLOCKQUOTE>
    null

  • Put SQL query in a function/ call function from region

    How can I write a SQL query (like SELECT EMPNO, ENAME, JOB FROM EMP) as PL/SQL function, and then call this function from the PL/SQL Function Returning SQL Statement region?
    Thanks, Tom

    thanks jverd for your quick reply.
    I know passing in a reference to an object will do the job if I want to change the value several parameters in one function call.
    But I want to ask, is there any other ways?
    the following code works.....
    public class TestParameter {
         public static void main(String[] args) {
              Test2 t2 = new Test2();
              invokeChange(t2);
              System.out.println("x = " + t2.x + "\t y = " + t2.y);
         static void invokeChange(Test2 t2) {
              t2.x = 10;
              t2.y = 15;          
    class Test2 {     
         int x;
         int y;     
    }

  • Calling the function from SQL query

    Hi,
    I am trying to run the below statement,
    Select to_number(apps.pay_balance_pkg.get_value( 326, :paa.assignment_action_id,to_date ('31032011','ddmmyyyy'))) from dual;
    getting an error as :
    ORA-14552 cannot perform a DDL, commit or rollback inside a query or DML
    ORA - 06512 at apps.pay_balance_pkg , line 4526.
    How can I execute this funciton "apps.pay_balance_pkg.get_value" from sql query?
    Thanks in advance.

    user1175432 wrote:
    Hi,
    I am trying to run the below statement,
    Select to_number(apps.pay_balance_pkg.get_value( 326, :paa.assignment_action_id,to_date ('31032011','ddmmyyyy'))) from dual;
    getting an error as :
    ORA-14552 cannot perform a DDL, commit or rollback inside a query or DML
    ORA - 06512 at apps.pay_balance_pkg , line 4526.
    How can I execute this funciton "apps.pay_balance_pkg.get_value" from sql query?
    Thanks in advance.If the function is performing DDL, commit or rollback inside it then you will not be able to call it from an SQL statement.
    Either change the function so it doesn't perform DDL, commit or rollback, or use a different means to obtain the information you want (assuming you can't change the function)

Maybe you are looking for

  • How do I change the format of a hard drive I have to make it work with my imac

    My friend has given me a hard drive to put some stuff on it for him, but it's formatted to Windows NT File System (VTFS) and I need to change it to MS-DOS (FAT32). How do I do this? Thanks

  • Reg..ALV using classes

    i have displayed a ALV report with a push button 'HST'. When i select a particular line(vbeln) and click on pushbutton 'HST' it has to display me a interactive report based on the condition vbeln and posnr. can anyone help me with the detail code usi

  • SRM 7 - hide user settings

    Hallo, we use SRM 7 with NWBC as web interface. I logon with employ role. In the Home Menu I press  SRM user Setting. In here I have 2 tabs: ´Position´ and ´User Accounts´ Question: how do I make the ´Position´ tab invisible Thank you Marco

  • Replacing XI with other technology

    Hi, I am exposer to XI. I need to know Where exactly use XI and what kind of projects we will expect in XI. Is there any Replacement or Compitator for XI In real time what kind of work its have.

  • Which Ports to use?

    I am kinda new to skype and don't know a lot about it. So i was just going through the options and stuffs ...and under the ''Advanced'' tab there's ''connection''..and it has a lot of options.. like ''use port ..for incoming connections'' ''enable up