How to insert a row in the detail table of a treeTable (master/detail)?

Is there any small, working example with JDev 11.1.2.1 on how to programmatically insert a row in the detail table represented by the treeTable component?
Please don't send links to this example http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html , which does not work.
Thanks.

Erp, why do you keep giving the links to that example or the zip including the project of that example? I explicitly asked to not send any links to that example, which does not work with jdev 11.1.2.1.
This is the exception from that one when trying to create a new record on the details:
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
:bndVarFirstName =null
<FormRenderer> <_warnUnpoppedContextChanges> ADF_FACES-60095:Durante l'elaborazione del renderer del form, la modifica di contesto trovata non corrisponde al componente previsto.
<UIXCollection> <processSaveState> è possibile che la chiave di riga non venga reimpostata correttamente alla fine della richiesta. ID componente: :pc1:tt1, ViewId: /treeSample.jspx
<UIXComponentBase> <processSaveState> Salvataggio dello stato per gli elementi figlio del componente RichPanelCollection[UIXFacesBeanImpl, id=pc1] non riuscito.
<UIXComponentBase> <processSaveState> Salvataggio dello stato per gli elementi figlio del componente RichPanelGroupLayout[UIXFacesBeanImpl, id=pgl1] non riuscito.
<UIXComponentBase> <processSaveState> Salvataggio dello stato per gli elementi figlio del componente RichForm[UIXFacesBeanImpl, id=f1] non riuscito.
<UIXComponentBase> <processSaveState> Salvataggio dello stato per gli elementi figlio del componente RichDocument[UIXFacesBeanImpl, id=d1] non riuscito.
<LifecycleImpl> <_handleException> ADF_FACES-60098:Il ciclo di vita Faces ha ricevuto eccezioni non gestite nella fase RENDER_RESPONSE 6
java.lang.NullPointerException
     at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.findChildNode(JUCtrlHierNodeBinding.java:867)
     at oracle.jbo.uicli.binding.JUCtrlHierBinding.bringNodeToRangeKeyPath(JUCtrlHierBinding.java:788)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.bringNodeToRangeKeyPath(FacesCtrlHierBinding.java:111)
     at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:130)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(FacesCtrlHierBinding.java:830)
     at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:513)
     at org.apache.myfaces.trinidad.component.UIXCollection.processSaveState(UIXCollection.java:270)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1156)
     at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.saveView(StateManagerImpl.java:193)
     at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.getViewState(StateManagerImpl.java:134)
     at oracle.adfinternal.view.faces.renderkit.rich.PprResponseWriter._writeViewState(PprResponseWriter.java:514)
     at oracle.adfinternal.view.faces.renderkit.rich.PprResponseWriter.endDocument(PprResponseWriter.java:83)
     at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1490)
     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
     at oracle.adfinternal.view.faces.context.PartialViewContextImpl._processRender(PartialViewContextImpl.java:321)
     at oracle.adfinternal.view.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:152)
     at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
     at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
     at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
     at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
     at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
     at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
     at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
     at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Eccezione server durante PPR, n. 1
java.lang.NullPointerException
     at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.findChildNode(JUCtrlHierNodeBinding.java:867)
     at oracle.jbo.uicli.binding.JUCtrlHierBinding.bringNodeToRangeKeyPath(JUCtrlHierBinding.java:788)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.bringNodeToRangeKeyPath(FacesCtrlHierBinding.java:111)
     at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:130)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(FacesCtrlHierBinding.java:830)
     at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:513)
     at org.apache.myfaces.trinidad.component.UIXCollection.processSaveState(UIXCollection.java:270)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at org.apache.myfaces.trinidad.component.TreeState.saveState(TreeState.java:175)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.processSaveState(UIXComponentBase.java:1043)
     at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1156)
     at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.saveView(StateManagerImpl.java:193)
     at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.getViewState(StateManagerImpl.java:134)
     at oracle.adfinternal.view.faces.renderkit.rich.PprResponseWriter._writeViewState(PprResponseWriter.java:514)
     at oracle.adfinternal.view.faces.renderkit.rich.PprResponseWriter.endDocument(PprResponseWriter.java:83)
     at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1490)
     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
     at oracle.adfinternal.view.faces.context.PartialViewContextImpl._processRender(PartialViewContextImpl.java:321)
     at oracle.adfinternal.view.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:152)
     at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
     at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
     at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
     at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
     at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
     at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
     at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
     at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
while I get this from my own project based on the above one:
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
<UIXRegion> <_logIllegalContextChangeMessage> ADF_FACES-10026:Durante l'elaborazione del componente area, non è stata trovata una modifica di contesto oppure la modifica trovata non corrisponde all'istanza impostata dal componente corrente. Prevista oracle.adf.view.rich.component.fragment.UIXRegion$RegionContextChange, trovata UIXCollection.CollectionComponentChange[Component class: oracle.adf.view.rich.component.rich.data.RichTreeTable, component ID: tt1].
<UIXRegion$RegionSiteImpl> <validate> Attempt to validate an already invalid RegionSite:
<UIXCollection> <processSaveState> è possibile che la chiave di riga non venga reimpostata correttamente alla fine della richiesta. ID componente: :pt1:r1:pt1:pc1:tt1, ViewId: /main.jspx
Edited by: user10047839 on 20-ott-2011 7.23

Similar Messages

  • How to insert multiple rows in the database table with the high performance

    Hello everybody,
    I am using the struts,jsp and spring framework. In my application there are 100s of rows i have to insert into the database 1 by 1. I am using usertransaction all other things are working right but i am not getting the real time performance.
    Can anyone tell me the proper method to insert multiple records and also with fast speed

    I don't know much about Spring etc, but if the jdbc Statemenet.addBatch(), Statement.executeBatch() statements let you bundle a whole lot of sql commands into one lump to execute.
    Might help a bit...

  • How To Insert a Row If The Update Statement Fails?

    Hi folks,
    For some reason I just can't get this working and wanted to throw it out to everyone, very simple one so won't take much of your time up.
    Going through each row of the cursor, and wanting to update a table, if the record doesn't exist, then I want to insert it.....but nothing is happening.
    IF v_related_enrolement < 1
    THEN
    BEGIN
    -- Record NOT found in Study_block_associations
    -- Insert Student record into ADM_EVER_REGISTERED table
    -- Set Ever_Registered column to 'N'
    UPDATE adm_ever_registered
    SET ever_registered = 'N'
    WHERE personal_id = v_personal_id
    AND appl_code = v_appl_code;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    INSERT INTO adm_ever_registered VALUES(v_personal_id, v_appl_code, v_choice_no, 'N');
    END;
    ELSE

    It's better to use a merge statement in this case.
    Your code doesn't work because of the false assumption that an update statement that doesn't update a single row fails with a no_data_found exception, where it's a successful update statement that just doesn't update a single row. So instead of the exception, use a "if sql%rowcount = 0 then" construct to make your current code work. Best option, as said, is to switch to the merge statement.
    Regards,
    Rob.

  • How do I select rows from the same table that have multiple occurances

    Hi Everybody,
    I am trying to select records from a detail table by grouping it. The table has more than 1 million records and the query is not performing well. The basic question is how to select a distinct record from a table which matches all values in one column and any in the other.
    desc SCV
    ID NUMBER PK (ID + SCRID)
    SCRID NUMBER FK(SC)
    ID SCRID
    1 1
    2 1
    3 1
    4 2
    5 2
    6 3
    7 4
    8 4
    desc PROJECTS
    ID NUMBER PK
    NAME VARCHAR2(100)
    ID NAME
    1 PROJECT1
    2 PROJECT2
    3 PROJECT3
    4 PROJECT4
    desc PJS
    ID NUMBER
    PROID NUMBER FK (PROJECTS)
    SCRID NUMBER FK (SCV(SCRID + SCVID)
    SCVID NUMBER
    ID PROID SCRID SCVID
    1 1 1 1
    2 1 1 2
    3 1 2 5
    4 1 3 6
    5 1 4 7
    6 2 1 3
    7 2 2 4
    8 2 2 5
    9 2 4 7
    There are over 1 million records in PJS.
    desc TBP
    SCRID NUMBER
    SCVID NUMBER
    SCRID SCVID
    1 1
    1 2
    1 3
    2 4
    2 5
    3 6
    4 7
    4 8
    The requirement is to select projects that have matching SCRID, SCVID from TBP such that
    all distinct SCRID should match and within that and any SCVID match will do. (A "AND" between each SCRID and an "OR" for each SCVID in that SCRID like 'SCRID = 1 AND (SCVID = 1 OR SCVID = 2 OR SCVID = 3) AND SCRID = 2 AND (SCVID =....)
    So, for the sample data it should return us PROID = 1
    I have few queries written for this:
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 1
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 2
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 3
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 4
    This query performs well but the cost is very high, hardcoding, sorting.
    The 2nd option is to:
    SELECT pjs.PROID proid
    FROM TBP tbp,
    PJS pjs
    WHERE pjs.SCVID = tbp.SCVID
    AND pjs.SCRID = tbp.SCRID
    GROUP BY pjs.PROID
    HAVING COUNT(DISTINCT pjs.SCRID) = (SELECT COUNT(DISTINCT SCRID ) FROM TBP)
    This has a low cost but runs slowly.
    One more way I tried was with the IN operator like
    SELECT DISTINCT PROID FROM PJS A,TBP T WHERE T.SCRID = 1 AND T.SCVID = A.SCVID
    AND PROID IN (SELECT PROID FROM PJS A,TBP T WHERE T.SCRID = 2 AND T.SCVID = A.SCVID
    AND PROID IN (...SO ON with each DISTINCT SCRID.
    Again this involves too much of sorting.
    Any help will be appriciated.
    Thanks in advance.

    Hi Andrew,
    Use DELETE t_itab statement inside the loop.
    I have modified your code. It is perfectly working.See bellow  -
    LOOP AT it_zmember01 INTO wa_zmember01.
    WRITE: / wa_zmember01-mnumber UNDER 'NUMBER',
    wa_zmember01-mname UNDER 'NAME',
    wa_zmember01-mdob UNDER 'DOB'.
    WRITE / '-----------------------------------------------------------------'.
    DELETE it_zmember01.               " Modified
    ENDLOOP.
    DELETE it_zmember01. statement inside the loop will delete the current row of the table.
    Regards
    Pinaki

  • How to insert an ID into the related tables???

    Hi,
    I have 3 tables in my database who are related.
    Table employees, functions and specializations
    The employees table has an empID, functions has an funID and the related empID and specializations has an speID and to the related empID.
    When I insert a new employee, i want that the empID from employees is automatically inserted into the tables functions and specializations.
    How can I do that with SQL???????

    Why PL/SQL code of course. :)
    SQL> create table employees
      2    (emp_id number,
      3     emp_name varchar2 (20)
      4    ) ;
    Table cr&eacute;&eacute;e.
    SQL> create table functions
      2    (emp_id number,
      3     fun_id number,
      4     fun_name varchar2 (20)
      5    ) ;
    Table cr&eacute;&eacute;e.
    SQL> create trigger employees_afi
      2     after insert on employees
      3     for each row
      4  begin
      5     insert into functions (emp_id) values (:new.emp_id) ;
      6  end ;
      7  /
    D&eacute;clencheur cr&eacute;&eacute;.
    SQL> insert into employees (emp_id, emp_name) values (1, 'SMITH') ;
    1 ligne cr&eacute;&eacute;e.
    SQL> select * from functions ;
       EMP_ID    FUN_ID FUN_NAME
            1
    SQL>

  • Problem with inserting a row in the current table

    I am working on Html editor using swings.
    actually i am trying to insert a row using
    private void insertTableRow(int cols)
              StringBuffer sRow = new StringBuffer();
              sRow.append("<TR>");
              for(int i = 0; i < cols; i++)
                   sRow.append("<TD></TD>");
              sRow.append("</TR>");
              //System.out.println(sRow);
              int caretPos = jtpMain.getCaretPosition();
              System.out.println(caretPos);
              ActionEvent actionEvent = new ActionEvent(jtpMain, 0, "insertTableRow");
              //System.out.println("raju" +sRow.toString());
              new HTMLEditorKit.InsertHTMLTextAction("insertTableRow", sRow.toString(), HTML.Tag.TABLE, HTML.Tag.TR).actionPerformed(actionEvent);
              refreshOnUpdate(); // optional refresh code
         }this is performing well when the cursor is at the last cell
    of the row.But now working ,when the cursor in the remaining cells it gives in correct table.
    pls any one can help

    You probably have to first search your text for a <TR> tag to insert rows above, (place your new row text infront of the tag), or search for a </TR> tag to insert rows below, (place new row text after the tag). Otherwise you will be inserting the row in the middle of a cell.
    Jerome.

  • How to insert a value in the Validity Table with Report ABAP

    Hi,
    I should insert in the validity table in the field "To Mode" the value "R" through a report ABAP.
    Is possible? Have I seen that the exist FM RSDV_INSERT_VALID_TAB. Is possible to use ? As?
    Thanks.

    Hi, thanks the same to everybody. I have already resolved.
    Regards.
    Charly1

  • How to insert new record in the database table using the Jdeveloper

    Hi Masters
    I am new Bee in j2EE developing side and i ahve oracle jdeveloper 9i version is 9.0.4
    And now I wann to know that how can i create the web application that will enter the Data in the HTML FORM and save that data into the Table emp plz tell me step by step
    thx in advance

    the steps to follow -
    download JDeveloper 10.1.2 from OTN (9.0.4 is very old and has some features that won't be in the next releases).
    Then follow the ADF Workshop from the JDeveloper home page on OTN.
    (If you have to use 9.0.4 then look for the archives of JDeveloper on OTN)
    for example:
    http://www.oracle.com/technology/products/jdev/viewlets/viewlet-archive0903.html

  • How to insert a record to the z-table.

    Hi Experts,
    I have created one z-tabe with fields
    refnum, and
    status.
    if the refnum is >200 ; Status field should get the value as "TRUE" else "FALSE".
    could any one help me on this.
    regards,
    Sunil

    hi,
    try this.
    data : itab type standard table of (name of ur ztable) with header line.
    select * from (ztable) into table itab.
    loop at itab.
    if itab-refnum > 200.
    itab-status = 'true'.
    else.
    itab-status = 'false'.
    endif.
    modify table itab[] from itab index sy-tabix.
    endloop.
    update (ztable) from table itab.
    hope this gives some idea.

  • How to insert Existing rows by modifying some cloumns values??

    Respected experts ,
    I have 72 rows in a table .I want to insert another 72 rows with one column value change and another columns value same??
    Please suggest me how I do this ????
    Thanks in advance.

    Do you want to insert 72 rows from the same table but just changing  value of the one column? If so,  take a look at Scott's solution
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to populate rows in the detail table of a form from another table.

    please can someone help me here:
    i have a master/detail page. the master data is created and then i would like to do this: when one goes to the detail page (when first created), i would like somehow to populate all the rows in the detail table from rows retrieved in another table (with conditions).
    i am new to apex so if this is a stupid question i apologise in advance!

    Hi
    Firstly, there are no stupid questions, we all start somewhere!
    However, I could do with some more detail (or even better an example on apex.oracle.com). Please can you post exactly what you have so far and what you want to achieve with simple details of the tables involved.
    It sound like you may need to create a custom process to populate the details. You say 'with conditions'... what conditions?
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • How to insert a row in Tree table which is dragged from the table?

    Hi All,
    I am having a Tree table and a Table in the same page, like below
    Treetable                                         Table
    Item1                                              Subitem12
         Subitem1                                   Subitem13
         Subitem2                                   Subitem14
         Subitem3                                   Subitem15
         Subitem4                                   Subitem16
    Item2                                              Subitem17
         Subitem5                                   Subitem18
         Subitem6                                   Subitem19
         Subitem7                                   Subitem20
         Subitem8                                   Subitem21
    Item3
         Subitem9
         Subitem10
         Subitem11
    The requirement is i need to "drag" a row from the Table and place it under any parent node in the Tree table.
    What i have done is I make the Tree table as ".ui-sortable" and table as a "draggable".
    I am not able to find the position of the dragged item when i dropped it in the Treetable.
    Please provide me a solution.
    Regards,
    Aravindh

    Hello:
    Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
    If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
    Thanks for the help.

  • How to insert a row in database trough AappModule

    HI,
    I have used below code for getting details from databse. Now i have to insert a row in the database.
    Kindly let me know how can i use below code for inserting a row in the database. or should i make any change in its viewObject's Query.
    If there is any another way of inserting data in database through method binding please let me knoe that.
    ApplicationModule myService = ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
    ViewObject userInfoVO = myService.findViewObject("EmployeeViewParam1");
    userInfoVO.executeQuery();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EmployeeViewParam1Iterator");
    RowSetIterator rowIter1 = dcItteratorBindings.getRowSetIterator();
    Row[] rows1 = rowIter1.getAllRowsInRange();
    for(int i=0;i<rows1.length;i++)
    this.empId = (String)rows1.getAttribute("EmployeeId"); // primary key
    this.employeeName = (String)rows1[i].getAttribute("Employeename");
    Thanks and Regards,

    HI,
    i have tried belod code. for this i have made AppModuleImpl Class and wrote below method in that and called this method from my bean class with help of AppModuleImpl's Object.
    public void createEmployee (){
    ViewObjectImpl employee=getEmployeeView1();
    // ViewObject employee= findViewObject("EmployeeView");
    Row row = employee.createRow();
    row.setAttribute("Employeeid",189420);
    row.setAttribute("Employeename","Test");
    //Insert row in to the default row set
    employee.insertRow(row);
    but it is giving nullPointerException at line Row row = employee.createRow();
    Kindly help me to shortout this.

  • How to insert a row in oracle

    how to insert a row in oracle if we have three colums all are number datatype i want one of the column blank;

    Hi,
    James has replied to your question ..
    you seem to be new to sql
    just adding to it for you information.. that in this case col2 will have NULL value.
    I suggest you may please read the startup docs... They shall help you to unserdstand the sql better.
    http://www.w3schools.com/sql/default.asp
    Regards

  • How to insert a button on the column header of a table in webdynpro java

    Hi
    Can anyone tell me how to insert a button on the column header of a table in webdynpro java?
    regards
    sunit

    Hi sunit,
    Instead of adding button in the column header , in the column
    add a fixed top cell.
        right click on the column
        Insert FixedTopCell
        Right click on the fixedTopCell
        insert Editor.
       select button.
    then button will be only in the top most row.
    Hope it will satisfy ur requirement
    Regards
    Smitha

Maybe you are looking for