How to find a dependent row in the all tables using single SQL query
hi all,
I have created some table with master and some dependent tables.I want to mark a (row)tuple as inactive in master so that corresponding child records also should be marked as inactive.
So i decided to mark the master and dependent records as inactive starting from master table and traverse to child tables.
So I need SQL query to fetch all dependend records to the row(marked row in the master ) from the master table and dependent rows from the child row and to mark as flag inactive.
can anybody help me out to build this query or any other way to mark flag as inactive ?
Regards
punithan
You can find dependant tables from ALL_CONSTRAINTS, e.g:
SQL> CREATE TABLE m (id INT PRIMARY KEY, flag VARCHAR2(1) NOT NULL);
Table created.
SQL> CREATE TABLE d1 (m_id REFERENCES m, flag VARCHAR2(1) NOT NULL);
Table created.
SQL> CREATE TABLE d2 (m_id REFERENCES m, flag VARCHAR2(1) NOT NULL);
Table created.
SQL> SELECT table_name, owner, status
2 FROM all_constraints c
3 WHERE c.constraint_type = 'R'
4 AND ( c.r_owner, c.r_constraint_name ) IN
5 ( SELECT owner, constraint_name
6 FROM user_constraints
7 WHERE table_name = 'M'
8 AND constraint_type IN ('U','P') );
TABLE_NAME OWNER STATUS
D2 WILLIAMR ENABLED
D1 WILLIAMR ENABLED
2 rows selected.There is no SQL command to apply all updates in one go, if that's what you were looking for.
AFAIK the word "tuple" is for mathematics and relational theory, and does not refer to a physical row in a database.
Similar Messages
-
How to find out which type of the driver is used in our application?
Hi all,
can anyone tell me how to find out which type of the driver is used in our application?
Thanks in advance,
PhoenioxHi,
Check out this...
Class.forName("com.mysql.jdbc.Driver"); //if u r using MySql
List drivers = Collections.list(DriverManager.getDrivers());
for(int i=0;i<drivers.size();i++)
Driver driver = (Driver)drivers.get(i);
String driverName = driver.getClass().getName();
System.out.println("Driver "+i+":::"+driverName);
you need to load the driver and display in the same program.
Then only you'l get the required result.
prakhyath -
How to delete rows in the target table using interface
hi guys,
I have an Interface with source as src and target as tgt both has company_code column.In the Interface i need like if a record with company_code already exists we need to delete it and insert the new one from the src and if it is not availble we need to insert it.
plz tell me how to achieve this?
Regards,
sai.gatha wrote:
For this do we need to apply CDC?
I am not clear on how to delete rows under target, Can you please share the steps to be followed.If you are able to track the deletes in your source data then you dont need CDC. If however you cant - then it might be an option.
I'll give you an example from what im working on currently.
We have an ODS, some 400+ tables. Some are needed 'Real-Time' so we are using CDC. Some are OK to be batch loaded overnight.
CDC captures the Deletes no problem so the standard knowledge modules with a little tweaking for performance are doing the job fine, it handles deletes.
The overnight batch process however cannot track a delete as its phyiscally gone by the time we run the scenarios, so we load all the insert/updates using a last modified date before we pull all the PK's from the source and delete them using a NOT EXISTS looking back at the collection (staging) table. We had to write our own KM for that.
All im saying to the OP is that whilst you have Insert / Update flags to set on the target datastore to influence the API code, there is nothing stopping you extending this logic with the UD flags if you wish and writing your own routines with what to do with the deletes - It all depends on how efficient you can identify rows that have been deleted. -
How to soft delete a row from the target table?
Could someone help me on this requirement?
How to implement the below logic using only ODI? I am able to implement the below logic with the "DELETE_FLAG" as "N".
I want to make the latest record with the flag as "N" and all the previous other records with the flag as "D".
Thanks a lot in advance.
I have a source table "EMP".
EMP
EMPID FIRST_NAME
1 A
2 B
First name is changed from A to C and then, C to D etc. For each data change, I would add a target row and mark the latest row as "N" and the rest as "D". The target table would contain the following data:
Target_EMP
EMPID FIRST_NAME DELETE_FLAG
1 A D
1 C D
1 D NThe problem is that I can't delete the row cause it demands from me to fill the mandatory field previously. It takes place when the key field is ROWID. In other cases delete is succesful.
-
How to find open line items from the BSID table
Hello Guru's
I need some fever from you......... please any one tell me that How to find the open line items from the BSID table .
please replay ASAP..
Regards,
Raghunath.SHi Raghunath
BSID and BSAD are Secondary Index tables for Customer line items. All customer open items are stored in BSID table and Cleared items are stored in BSAD table.
Regards,
Venkat -
How to delete the row from the ADF table using popup box
Hi,
I have one requirement like need to delete a record from the table, but that time need to show one popup window for confirmation of the deletion. I am using Delete buttom from the vo operations. I am able to delete the row with out popup but when i used the popup that time deletion is not happening.
Can any one help me in this.
Regards,Issue was resolved.
-
How to know primary key column name form a table name in sql query
Suppose I only know the table name. How to get its primary key column name from the table name?
ThanksViews don't have primary keys though their underlying tables might. You'd need to pick apart the view to determine where it's columns are coming from.
You can select the text of the view in question from user_views. -
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 -
Trigger in mutation - Update another rows in the same table with a trigger
Hi ,
I try to do a before update trigger on a table , but the trigger is in mutation. I understand why it do that but my question is :
How can I update other rows in the same table when a UPDATE is made on my table??????
Here is my trigger :
CREATE OR REPLACE TRIGGER GDE_COMPS_BRU_5 BEFORE
UPDATE OF DEPARTEMENT--, DISCIPLINE, DEG_DEMANDE, CE_ETAB
ON GDEM.COMPOSITION_SUBV
FOR EACH ROW
Organisme : FQRNT-FQRSC
Date de création : 14-07-2011
Date de modification :
Modifié par :
Auteur : Johanne Plamondon
Description : Ce déclencheur s'executera lors de la modification
du responsable dans la table COMPOSITION_SUBV
DECLARE
V_OSUSER V$SESSION.OSUSER%TYPE;
V_PROGRAM V$SESSION.PROGRAM%TYPE;
V_TERMINAL V$SESSION.TERMINAL%TYPE;
V_MACHINE V$SESSION.MACHINE%TYPE;
V_MODULE V$SESSION.MODULE%TYPE;
V_LOGON_TIME V$SESSION.LOGON_TIME%TYPE;
V_AUDIT_ID NUMBER;
vSEQ NUMBER;
i NUMBER;
vID DEMANDE.ID%TYPE;
BEGIN
begin
SELECT OSUSER, PROGRAM, TERMINAL,MACHINE,MODULE, LOGON_TIME
INTO V_OSUSER,V_PROGRAM,V_TERMINAL,V_MACHINE,
V_MODULE,V_LOGON_TIME
FROM V$SESSION
WHERE TYPE = 'USER'
AND USERNAME = USER
AND LAST_CALL_ET IN (0,1)
AND ROWNUM < 2;
exception when others then null; end;
IF NVL(:NEW.SC_PART,' ') = 'CHC' THEN
SELECT COUNT(*)
INTO i
FROM DEMANDE
WHERE DEM_REF = :NEW.DEM_ID
AND PER_NIP = :NEW.PER_NIP;
IF i = 1 THEN
SELECT ID
INTO vID
FROM DEMANDE
WHERE DEM_REF = :NEW.DEM_ID
AND PER_NIP = :NEW.PER_NIP;
UPDATE COMPOSITION_SUBV
SET --CE_ETAB = :NEW.CE_ETAB,
--DISCIPLINE = :NEW.DISCIPLINE,
DEPARTEMENT = :NEW.DEPARTEMENT,
--DEG_DEMANDE = :NEW.DEG_DEMANDE,
DATE_MODIF = SYSDATE,
USER_MODIF = V_OSUSER
WHERE DEM_ID = vID
AND PER_NIP = :NEW.PER_NIP
AND ANNEE = :NEW.ANNEE;
END IF;
END IF;
/*EXCEPTION
WHEN OTHERS THEN
NULL;*/
END;A standard disclaimer, the mutating trigger error is telling you that you really, really, really don't want to be doing this. It generally indicates a major data model problem when you find yourself in a situation where the data in one row of a table depends on the data in another row of that same table. In the vast majority of cases, you're far better off fixing the data model than in working around the problem.
If you are absolutely sure that you cannot fix the data model and must work around the problem, you'll need
- A package with a collection (or global temporary table) to store the keys that are modified
- A before statement trigger that initializes the collection
- A row-level trigger that adds the keys that were updated to the collection
- An after statement trigger that iterates over the data in the collection and updates whatever rows need to be updated.
If you're on 11g, this can be simplified somewhat by using a compound trigger with separate before statement, row-level, and after statement sections.
Obviously, though, this is a substantial increase in complexity over the single trigger you have here. That's one of the reasons that it's generally a bad idea to work around mutating table exceptions.
Justin -
How can we change value of a field in the Repeating Table using SharePoint Workflow 2013.
Hi
I have an InfoPath form published on a SharePoint Library. The form contains a Repeating table and after submit a workflow runs. In this workflow I want to change some values of the fields within Repeating table.
How can I do this?
Thanks.Hi,
I found a similar thread posted by you here:
http://social.technet.microsoft.com/Forums/en-US/e1fa36c1-cb5c-456d-ba40-2f26301913d2/how-to-loop-through-each-row-in-a-repeating-table-using-sharepoint-workflows?forum=sharepointgeneralprevious
I suppose both the threads are reuqesting the method to get values from repeating table via workflow, so we can focus on the issue on the other case. If there is more requestment here, let me know.
Regards,
Rebecca Tu
TechNet Community Support -
How to find 'n' th maximum salary in employees table
how to find 'n' th maximum salary in employees table using stored procedure............
Depends on your unmentioned database version.
In general you're asking for a Top-N query.
See this article:
http://www.oracle.com/technetwork/issue-archive/2007/07-jan/o17asktom-093877.html
In 11g you have http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions114.htm#CJAFEJBE
an analytic function
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#SQLRF06174 -
XMLIndex: finding indexed XPaths and the number of rows in the path table
Hi,
I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
If anyone knows a more straightforward way of doing this all advice is very much appreciated.
Best Regards,
Rasko LeinonenThanks Marco,
I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
begin
for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
loop
declare
v_i BINARY_INTEGER := 1;
v_id raw(8);
v_len BINARY_INTEGER := 2;
v_skip BINARY_INTEGER := 1;
begin
while v_i < utl_raw.length(v_row.path) and
v_i + v_len <= utl_raw.length(v_row.path)
loop
v_i := v_i + v_skip;
v_id := utl_raw.substr(v_row.path, v_i, v_len);
--dbms_output.put_line(v_id);
for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
where ID = v_id )
loop
if rawtohex(v_row2.flags) = '01'
then
dbms_output.put('@');
end if;
dbms_output.put(v_row2.localname);
if v_i + v_len < utl_raw.length(v_row.path)
then
dbms_output.put('/');
end if;
end loop;
v_i := v_i + v_len;
end loop;
dbms_output.put_line('');
end;
end loop;
end;
Example output:
RUN
RUN/@accession
RUN/@alias
RUN/@instrument_model
RUN/@run_date
RUN/@run_center
RUN/@total_data_blocks
RUN/EXPERIMENT_REF
RUN/EXPERIMENT_REF/@accession
RUN/EXPERIMENT_REF/@refname
RUN/DATA_BLOCK
RUN/DATA_BLOCK/@name
RUN/DATA_BLOCK/@total_spots
RUN/DATA_BLOCK/@total_reads
RUN/DATA_BLOCK/@number_channels
RUN/DATA_BLOCK/@format_code
RUN/DATA_BLOCK/@sector
RUN/DATA_BLOCK/FILES
RUN/DATA_BLOCK/FILES/FILE
RUN/DATA_BLOCK/FILES/FILE/@filename
RUN/DATA_BLOCK/FILES/FILE/@filetype
RUN/RUN_ATTRIBUTES
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE -
How to find latest updating row in a table
Hi
How to find latest updating row in a tableADF 7 wrote:
SELECT * FROM Table WHERE lastupdTimestamp = (SELECT MAX(lastupdTimestamp) FROM Table)lastupdtimestamp - holds and date an time of an records when it last updation takes place in table.
lastupdtimestamp is a column in my table.And how will this make sense in the scenario I've described, where UserA does an update before UserB, but commits the update after UserB's commited update? And add UserC and UserD and a 1000 more users to this scenario where concurrent updates happen.
What actual time does this lastupdtimestamp contain and represent? And why? How is that lastupdtimestamp used in business logic and processing? Or is it just a silly-bugger-let's-add-somekind-of-time column to that table that essentially meaningless?
Not saying that one should never add such a timestamp based column. Simply that one needs to understand WHAT it contains and it needs to be SENSIBLY used within the data model.
However, in my experience such columns are often slapped on afterwards, never featured in the actual data model designed, and is then used without a second though that the database and its data is a multi-user and multi-process system. And things happen at the same time. And things overlap (serialisation is the exception - not the rule). -
Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.The Oracle documentation has a good overview of the options available
Generating XML Data from the Database
Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
You can also find some information in XML DB FAQ -
How to Find out the all tables in module wise ?
Dear Friends,
1.How to Find out the all tables in module wise ?
what are the total number of table in SAP ?
2. how to find out all existing functions in SAP ?
Thanks and regards,
Subasha Chandra Sahoo.Hi,
You will get the module wise list from:
http://www.sourceveda.com/SAPReference.htm
http://www.sourceveda.com/
Regards...
Maybe you are looking for
-
Can 2 different iphones share the same apple ID?
Can my husband who just got a I phone use my apple ID? He wants to get our Itunes from the computer on his phone.
-
Can I use a network hard drive to store my music
This might be more of an Itunes question, but I would like to know if there is a problem using a network Hard drive to store all my music on? I'll be using 2 computers to access it, 1 computer handles my kids for there Ipods each having there own log
-
Follow/read a growing binary file
Hello, Application space: 1 - I have an application that has created and opened a binary file, and is is writing data to it on a continual basis. 2 - Using another program written in Labview, I need to open this file for reading, get all the data ava
-
Oracle VM Manager V2V Issue revolving Local Repo to each host.
Hi all, I have 5 oracle SPARC hosts running in my environment. But the problem starts when I'm forced to commit to an unusual storage mapping by mapping each hosts to their individual local repository. Bear in mind that this is due to storage archite
-
I created a process chain that has 3 text file master data loads using the LOADING process type on version BW 3.0B. If I delete the text file for one of the loads, the load will fail and I would like to restart the load from the failure point. When