Drop a primary key

If it does not create an orphan can not drop us a primary key?

My book says no.  Steve O'Hearn page text 1z0-047 432.

For example, consider this code:

CREATE TABLE CRUISE_ORDERS

(NUMBER OF CRUISE_ORDER_ID,

ORDER_DATE DATE,

PK_CO (CRUISE_ORDER_ID, ORDER_DATE) PRIMARY KEY CONSTRAINT);

CREATE TABLE ORDER_RETURNS

(NUMBER OF ORDER_RETURN_ID,

NUMBER OF CRUISE_ORDER_ID

DATE OF CRUISE_ORDER_DATE,

CONSTRAINT PK_OR PRIMARY KEY (ORDER_RETURN_ID).

FOREIGN KEY CONSTRAINT FK_OR_CO

(CRUISE_ORDER_ID, CRUISE_ORDER_DATE)

REFERENCES CRUISE_ORDERS (CRUISE_ORDER_ID, ORDER_DATE));

These SQL statements will create two tables with a FOREIGN KEY relationship

linking them together - see Figure 11 - 1 for the model of data representing the

relationship.

In the CRUISE_ORDERS table that we just created, we cannot let down the CRUISE_

ORDER_ID column or the ORDER_DATE column, for two different reasons:

They are part of the PRIMARY KEY constraint and forced to columns

cannot be deleted unless the constraint first fell;

They are part of the key referred to in the FOREIGN KEY of another table.

They cannot be deleted as long as a FOREIGN KEY constraint refers to them.

Similarly, we cannot remove the column the table ORDER_RETURNS that

is subject to the constraint PRIMARY KEY (ORDER_RETURN_ID), or the...

Easily, you should be able to remove the column order_return_id. I did it myself. Only, I caught this post back to the chapter for a review and it made no sense to me. Perhaps because it refers to PL/SQL or an older version? (the book is 5 years old).

In any case I do not see why a primary key without dependent columns could not be deleted.

Like I said I tested it, and it can be moved.

This isn't what the text says. It is said that if PK in question is mentioned by a FK, you can not remove the PK. If you take the part of the sentence on its own "BOLD", it is obviously fake.

Tags: Database

Similar Questions

  • Primary key cause problem in the meantime Partition Exchange

    DB: 11.2.0.2
    OPERATING SYSTEM: AIX 6.1

    I get the problem when exchanging data with range partitioned table. I have a partitioned table of interval and a regular intermediate table with data to be uploaded.
    Here are the steps that I did.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    
    Table created.
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    
    Table altered.
    
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    
    1 row created.
    
    SQL> commit;
    
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS   
    
    SYS_P98 partition is added to table automatically.
    
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4)); 
    
    Table created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    
    
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    
    Table(s) Locked.
    
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    *
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION
    Now, if I turn off and drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    
    Table altered.
    
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    
    Table altered.
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION; 
    
    Table altered.
    
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
    
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
    ---------- ---------- --------- ---------- ----------
            30          3 21-MAY-13       2000         12
    
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    
    no rows selected
    Please suggest.

    First of all, thanks for posting the code that allows us to reproduce your test. It is essential for such problems.

    Because the primary key is global you will not be able to use

    INCLUDING INDEXES
    WITH VALIDATION;
    

    And you need to add the primary key to the temporary table

     ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);
    

    The Exchange will work. You must rebuild the primary key after the Exchange.

  • modify a primary key constraint

    Hello

    I start with oracle, and I have two doubts which cannot handle after a search on the internet.

    1. it is possible to do an ALTER TABLE for a DEFAULT CONSTRAINT?. Maybe you think that the question should be in a different way like this: oracle database takes the default condition as a constraint?. As far as I know, not done that.

    2. it is possible, with an ALTER TABLE to CHANGE a CONSTRAINT of a PRIMARY KEY, to add another field more?

    I searched the internet, but I have not found a clear answer. I use oracle 10g express edition.


    Thank you very much.

    P.D.:sorry for my English, it is not very good.

    #2-you can not 'add a column to the primary key of a table constraint' with a single ALTER, but you can delete and re-create the constraint primary key (including the additional column).

    13:25:26> create table t1 (a number primary key, b number, c number );
    
    Table created.
    
    Elapsed: 00:00:00.09
    13:25:46> alter table t1 drop primary key;
    
    Table altered.
    
    Elapsed: 00:00:00.06
    13:25:47> alter table t1 add primary key (a,b);
    
    Table altered.
    
    Elapsed: 00:00:00.09
    

    But you will not be able to drop the primary key of a table index.

    13:25:47> create table t2 (a number primary key, b number, c number ) organization index;
    
    Table created.
    
    Elapsed: 00:00:00.03
    13:25:59> alter table t2 drop primary key;
    alter table t2 drop primary key
    *
    ERROR at line 1:
    ORA-25188: cannot drop/disable/defer the primary key constraint for
    index-organized tables or sorted hash cluster
    
    Elapsed: 00:00:00.00
    13:25:59> 
    

    #1-I'm not sure I understand your question, but you can change a table column to have a default value. This isn't a "constraint", but a default value. It has an effect when you perform an insert which does not include this column.

    13:31:23> alter table t1 modify (c default 3.14);
    
    Table altered.
    
    Elapsed: 00:00:00.04
    13:31:24> insert into t1 (a,b,c) values (1,2,3);
    
    1 row created.
    
    Elapsed: 00:00:00.01
    13:31:24> insert into t1 (a,b,c) values (4,5,NULL);
    
    1 row created.
    
    Elapsed: 00:00:00.00
    13:31:24> insert into t1 (a,b) values(6,7);
    
    1 row created.
    
    Elapsed: 00:00:00.01
    13:31:24> select * from t1;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
             4          5
             6          7       3.14
    
    3 rows selected.
    
    Elapsed: 00:00:00.18
    
  • Deleted primary key seems to work!

    Hello

    I dropped the primary key on a table T1 using...
    ALTER TABLE DROP CONSTRAINT PK_T1; 
    And, when I try to insert a new row with the same value in the column, Oracle said...
    Unique key violated. T1.PK_T! 
    Can someone tell me why this phenomenon occurs?

    Thank you.

    Can you please delete the primary key by using

    Select constraint_name, table_name from User_Constraints where constraint_nanme = 'PK_T1 ';

    Also check if there is any index build on the column primary key from USER_IND_COLUNMS.

    Concerning

  • Drop primary key

    Hello

    Using the version of database

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Solaris: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production


    When I use the command alter table < tablename > drop drop key primary index. the primary key and the corresponding index falls.

    But when the same code is run in the environment SIT the associated primary key column became able NULL. Is it because of an incompatibility of versions of database? In my environment of the column is NOT yet Bull.

    Can someone help me on this

    Probably in a database of the column was already NOT NULL before creating the primary key constraint, and Oracle does not need to implicitly not null.
    In other databases, there is no constraint NOT NULL, so when the primary key has been abandoned, the constraint was also missing.

    Question of control procedures insufficient source, nothing to do with the versions of database.

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • MySQL Insert with autoincremented primary key

    I did not before MySQL.  I try and hit a roadblock soon enough.

    I would like to insert new records and have the auto-generated primary key / auto-increment.

    So, I have attached a few screenshots.  The first is a screenshot of the MySQL settings for the table that I'm writing.  The second is the Labview code that I threw as well as I am trying to run.

    The complete of the error I get is:

    > Database Connection.viADO error: 0x80004005
    Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 3.51 Driver] [mysqld - 5.7.11 - log] field 'techniciansID' didn't is not a default value to create a NI_Database_API.lvlib:Rec - Command.vi-> NI_Database_API.lvlib:Cmd Execute.vi-> NI_Database_API.lvlibData.vi B tools insert-> Connection.vi in the database

    I know that this error indicates that the techniciansID has no default value and he won't write because of it... but since it is an AutoIncrement field, it seems like it should work.

    Any help would be appreciated.  Thank you

    Thad

    Setting to 0 did not work, but I understand it.  For some reason any when I was refreshing my tables in MySQL server and using the "Forward Engineer" feature, the changes were not multiplication.  I had to drop the schema of the database (attached image) and then do an "engineer forward."  I made the changes, but the tables and the columns still had the attributes of origin... guess they cannot be updated by the script during execution.

    After doing this and the original settings I had (autoincremented primary key), the insert works in MySQL and Labview.

    Thanks for all the answers.  They made me think and check some things I didn't have before.

    -Thad

  • How to create the validation for a composite primary key feature when I use create with operation of parameters to pass values to a page (i.e. the ADF table) to another page I get this error, how can I solve it. Please help me any one ASAP?

    Hello

    I have a page with adf faces table, I need to pass values to the table to another the inputfields page (both fields are composite primary keys), I'm passing values but I get the error while I'm passing values twice on the next page with a button command (using setPropertyListener) this error... Please help me?

    Houston-29114 ADFContext is not configured to process this exception messages. Use the code of exception stack trace and error to investigate the root cause of this exception. Root cause error code is Houston-25013. Error messages settings are {0 = oracle.jbo.Key [22 9]}

    ADF_FACES-60097: for more information, see the error log of the server for an entry beginning with: ADF_FACES - Exception during the PPR, #1 60096:Server


    The error log is...


    URL - target http://127.0.0.1:7101/Recruting-ViewController-context-root/faces/login.JSPX

    < ViewHandlerImpl > < _checkTimestamp > Apache Trinidad runs with control of activated timestamp. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml

    < UIXEditableValue > < _isBeanValidationAvailable > Validation Bean A provider is not present, so bean validation is disabled

    passing the user name: 201157

    < _LogUnhandledException > ADF_FACES - 60098:Faces life cycle receives exceptions that are unhandled in phase 5 of INVOKE_APPLICATION

    oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [22 primary key 9].

    at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:608)

    at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:617)

    at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1030)

    at oracle.jbo.server.EntityCache.add(EntityCache.java:541)

    at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1141)

    at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1140)

    at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:461)

    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:478)

    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5800)

    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1941)

    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2504)

    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2545)

    at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2510)

    at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11133)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1342)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)

    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at com.sun.el.parser.AstValue.invoke (unknown Source)

    at com.sun.el.MethodExpressionImpl.invoke (unknown Source)

    at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173)

    at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:163)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1091)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:982)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:880)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:553)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:158)

    at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:115)

    at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:84)

    at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)

    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)

    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)

    to 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:125)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to 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)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

    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:139)

    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)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)

    to 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:Server Exception during the PPR, #1

    oracle.jbo.TooManyObjectsException: Houston-29114 ADFContext is not configured to process this exception messages. Use the code of exception stack trace and error to investigate the root cause of this exception. Root cause error code is Houston-25013. Error messages settings are {0 = oracle.jbo.Key [22 9]}

    at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:608)

    at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:617)

    at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1030)

    at oracle.jbo.server.EntityCache.add(EntityCache.java:541)

    at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1141)

    at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1140)

    at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:461)

    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:478)

    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5800)

    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1941)

    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2504)

    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2545)

    at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2510)

    at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11133)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1342)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)

    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at com.sun.el.parser.AstValue.invoke (unknown Source)

    at com.sun.el.MethodExpressionImpl.invoke (unknown Source)

    at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173)

    at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:163)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1091)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:982)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:880)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:553)

    at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:158)

    at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:115)

    at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:84)

    at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)

    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)

    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)

    to 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:125)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to 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)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

    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:139)

    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)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)

    to 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)

    Hi all, finally I found the solution to this exception.

    I did the following steps to solve the problem.

    1. create a bean and use this method

    public void tooManyObjectsMatchExceptioHandeler() {}

    Add the code in the event here...

    System.out.println ("inside the Handeler");

    FacesMessage message =

    new FacesMessage ("Type your friendly message");

    message.setSeverity (FacesMessage.SEVERITY_ERROR);

    FacesContext fc = FacesContext.getCurrentInstance ();

    fc.addMessage (null, message);

    }

    Now, drag and drop the file above java projects in data controls in the browser of the application.

    2. drag a workflow method call (where u get exception as Houston-25013) and call this method as an activity of the exception handler,

    Now, do a right click on this--> definition of the page method call create or go to definition of the page--> create a link Action method and select the above method in the select and file def page this method call in the workflow then go to properties inspector set out fixed property (here name of activities of method call) u give.

  • How to delete several lines in the details Table with PRIMARY KEY = ("VID", "LINEITEM")?

    Mr President

    My worm Jdev is 12.2.1.

    I have master tables / details.

    I have 2 lines for each PRIMARY KEY = ("VID", "LINEITEM") as below in the Details table.

    delete.png

    Please help how to get a button on a jsf page to remove these two lines at a time.

    Concerning

    So, in your app (data model) module, you have a master relationship / typical retail:

    And the relationship between them is based on some ViewLink

    Now go to the ViewLink, relationship, accessor.

    Take a look at the Destination accessor.

    Generate accessor object to check and give a name Acessor

    Then go to the master VO, Java and Include accessor, the class generate a display line:

    Go to the class view Java generated line, you'll find a method with the name of the accessor of the previous step, in the form of:

    public RowIterator getYourDetails...or_whaterever_IsAccessorName..() {
    }
    

    Now, in the same Java class, write the following Java method:

    public void removeDetails(){
      RowIterator details = getYourDetails...or_whaterever_IsAccessorName..(); // it is RowIterator over all details
      Row r = details.first();
      while (r != null) {
          r.remove();
          r = details.next();
      }
    }
    

    This method on the Cilent export line Interface:

    Finally, pass the data controls and drop this operation on the form as a button...

  • Trigger - use one to create primary key values

    I'm stuck on a simple use to do a TRIGGER that fires when you add new rows to a table and want to Developer SQL to add the primary key value.

    I seem to be able to relax, but it is not inserted the primary key but giving a SQL error: ORA-00947: not enough values.

    Here's what I have.

    CREATE TABLE HF_fishers

    (

    contact_id INT NOT NULL

    , name VARCHAR (25)

    , last_name VARCHAR (35)

    PRIMARY KEY (contact_id)

    );

    CREATE SEQUENCES HF_fishers_seq.

    Then I ran the following trigger:

    CREATE

    HF_fishers_seq_trigger RELAXATION

    BEFORE INSERTING

    ON HF_fishers

    FOR EACH LINE

    BEGIN

    IF (: new.contact_id IS NULL)

    THEN

    : NEW.contact_id: = NVL (: NEW.contact_id)

    HF_fishers_seq. NEXTVAL

    );

    END IF;

    END HF_fishers_seq_trigger;

    =============

    Then I executed the following SQL statement that gives the error.

    INSERT INTO HF_fishers VALUES('Jacob','Muller');

    But if I do everything is good except that it defeats the purpose of relaxation.

    INSERT INTO HF_fishers VALUES(1,'Jacob','Muller');

    MySQL has a nice 'AUTO_INCREMENT' command, but from what I understand in Oracle, I need to set up a trigger to automatically increment a column/cell, which in this case I use for the PRIMARY KEY.

    3003916 wrote:

    OK Jaramillo, I tried as you wrote, but what would be an INSERT statement correct?

    -After the code trigger of Jaramillo

    INSERT INTO HF_fishers (first_name, last_name) values ("Jesse", "Owens"); -I have the trigger but he made the mistake of duplicate key.

    INSERT INTO HF_fishers values (hf_fishers_seq.nextval, 'Jesse', "Owens");  -No trigger but get key duplicated,.

    INSERT INTO HF_fishers VALUES(:NEW_contact_id,'Jesse','Ownes'); -works without the trigger but the "get links" dialog box appears. So not much 'automatic' on this issue,.

    My mistake.  Here is the modified version of the trigger. I removed the CONDITIONAL clause and comes to be a part of the body of the trigger.

    So, I created the table, the sequence, the relaxation and ran the first two insert statements and it worked fine.  The third one you have invites SQL + or any tool you use to enter a value if she sees the ":" colon as a variable binding.  Colon only works in a trigger without asking for confirmation.

    Here is the code and my exit I ran home

    DROP TABLE hf_fishers CASCADE CONSTRAINTS PURGE;
    DROP SEQUENCE hf_fishers_seq;
    
    CREATE TABLE hf_fishers
    (
    contact_id   INTEGER NOT NULL
    ,first_name   VARCHAR(25)
    ,last_name    VARCHAR(35)
    ,PRIMARY KEY (contact_id)
    );
    
    CREATE SEQUENCE hf_fishers_seq;
    
    CREATE OR REPLACE TRIGGER hf_fishers_seq_trigger
       BEFORE INSERT
       ON hf_fishers
       FOR EACH ROW
    BEGIN
    
       IF(:NEW.contact_id IS NULL) THEN
          :NEW.contact_id := hf_fishers_seq.NEXTVAL;
       END IF;
    
    END hf_fishers_seq_trigger;
    
    INSERT INTO hf_fishers(first_name, last_name)
         VALUES ('Jesse', 'Owens');  -- Works with the trigger
    
    INSERT INTO hf_fishers
         VALUES (hf_fishers_seq.nextval, 'Jesse', 'Owens');  --Works without using the trigger body code.
    
    SELECT *
      FROM hf_fishers;
    
    COMMIT;
    

    The output

    Deleted table.

    Elapsed time: 00:00:00.05

    Sequence has fallen.

    Elapsed time: 00:00:00.02

    Table created.

    Elapsed time: 00:00:00.03

    Order of creation.

    Elapsed time: 00:00:00.02

    Trigger created.

    Elapsed time: 00:00:01.05

    1 line of creation.

    Elapsed time: 00:00:00.04

    1 line of creation.

    Elapsed time: 00:00:00.01

    CONTACT_ID FIRST NAME LAST NAME

    ---------- ------------------------- -----------------------------------

    1 Jesse Owens

    2 Jesse Owens

    2 selected lines.

    Elapsed time: 00:00:00.04

    Validation complete.

    Elapsed time: 00:00:00.01

  • When I have a constarint of deferable in the Oracle database, while creating the ADF BC, all the columns in this table is marked as primary key. any help on how to fix this?

    DROP TABLE TWO.

    DROP TABLE ONE;

    CREATE TABLE 'A

    (

    ACTIVATE THE 'ID' NUMBER NOT NULL,

    ACTIVATE THE "SERIAL" VARCHAR2 (10 BYTE) NOT NULL,

    ACTIVATE THE "FIRST NAME" VARCHAR2 (30 BYTE) NOT NULL,

    ENABLE 'PK_ONE' CONSTRAINT PRIMARY KEY ('ID', "SERIAL")

    )

    TABLESPACE 'USERS ';

    CREATE TABLE "TWO"

    (

    ACTIVATE THE 'ID' NUMBER NOT NULL,

    ACTIVATE THE "SERIAL" VARCHAR2 (5 BYTE) NOT NULL,

    ACTIVATE THE "DEGREE_CODE" VARCHAR2 (10 BYTE) NOT NULL,

    'TEST_NAME' VARCHAR2 (20 BYTE),

    ACTIVATE THE KEY PRIMARY CONSTRAINT 'PK_TWO' ('ID', 'SERIAL'),

    "FK_TWO' FOREIGN KEY ('ID', 'DEGREE_CODE') CONSTRAINT REFERS TO 'ONE' ('ID', 'SERIAL') MAYBE DEFERRED ENABLE

    )

    TABLESPACE 'USERS ';

    If we use the above sql scripts to create the tables and create the ADF BC using the above 2 tables, all 4 columns in table 2 are reported as the primary key.

    User, tell us your version of Jdev, please!

    You should file an SR with support.oracle.com for this.

    As a work around you can change the area of occurrence, and remove the check mark key pirmary on the unwanted columns. After that, it should work.

    Timo

  • Removal of cascade of primary key constraints

    I have 3 tables. P_1 = primary key

    P_2 P_1 and P_3 reference reference P-2 referencing P_1 column.

    I dropped the PK on P_1 constraint with the cascade option. However P_3 always reference P_1.

    I thought that this was the case when I started.

    May sound like a stupid question as how I already tried, but when I delete a constraint of Pk, a 3rd table referencing a second column in tables referring to the original column that has the constraint of PK, this 3rd column will retain its FK reference at the second table... ?

    I remember reading somewhere on what is true, that at least I am sure that I read in one of the oradocs, I just want to ask.

    Thank you.

    To make it very simple thinks this way...

    Since then, you drop PK of 1 table only means that the link between the 1st and the 2nd table is broken, but that does not drop the pharmacokinetics of the 2nd table... Also the link between the 2nd and the 3rd table is intact...

    So yes, 3rd table will maintain the relationship of FK to the 2nd table.

    Hope that's clear...

  • [ADF, JDev12.1.3] Mastering the form with detail tables: questions about Insertion/deletion, commit / rollback, primary key, handling,...

    Hallo,

    I have a panelTabbed with 4 tabs. In the 1st tab, there is a master form while each of the other tabs, there is a secondary table. Each tab "reads" vo.

    Please see here http://digilander.libero.it/flattit82/OTN_FILES/VoInTabs.png

    I created the graphichs/layout and now it's time to take care of the management of the transaction.

    In the master tab / form

    1)

    Here, I would put a button to remove the master record.

    When I delete a record in the primary table an automatism in the database (MS SQL Server) will automatically delete any registration which are linked to it in the detail tables.

    Could the automated system as this causes problems?

    In the Details tabs / tables

    2)

    I would put a button in each row to delete the line delivering. Can I just drag-and - drop, like button, af line: table the operation "Delete" of the VO istance detail used to create the af: table?

    3)

    If Yes, by clicking on the button performs the default delete operation. But if need to perform some actions before you run the deletion (or, in General, any other operation), how can I do?

    4)

    To create a folder that I use Create or CreateInsert? And what are the differences between them?

    5)

    When I create a new record I need set the value of a field of the VO on which is based the af: table. He filed, let's call it RowDetNumber, is not displayed in the af: table, because it doesn't have be filled in by the user. Mut value is calculated and set "secretly" before posting the new line to the database table. In particular, its value must be calculated as

    Select max (RowDetNumber) + 1

    of table_on_which_VO_is_based

    where some_conditions_on_fields_of_the_same_VO


    For example

    The VO selects all of the records that have FkId =: value. If value = 3, VO selection records:

    ID RowDetNumber OtherFields FkId

    1   3     1             ...

    2   3     2             ...

    3   3     3             ...

    4   3     4             ...

    The new record must be RowDetNumber = 5.

    I would like to know how permorm this.

    In general

    6)

    If the database tables have 1 or more triggers I have to take care of something?

    7)

    On the book "development of Web Applications with Oracle ADF Essentials - Sten E. Vesterli", I have read it could be problems when you use tables of database non-Oracle with auto-increment fields.

    The advice of author uncheck the 'Required' box in the model.

    All tables in my database have a primary keys that are auto-increment... so I uncheck the "mandatory"?

    8)

    In general how do I set these fields? I have to put in OT, VO or both?

    Thank you

    Federico

    Hello

    (1) you will need to re - question child iterators so that they do not look stale data

    (2) Yes. Ensure that the table is PPRed after deleting the line (should happen automatically if ChangeEventPolicy on iterator is set to ppr)

    (3) double click on the button and it creates a bean managed for you. It allows you to check a box to generate the code he would run to remove the line. Everything you put in front of the generated code is your code before

    (4) in the case of tables, use createInsert as it adds the new line to the rowset (transaction)

    (5) suggest to do this use a database trigger and the data attribute value DBSequence VO type

    (6) do not 'drop table' issue in SQL (sorry, couldn't resist ;-))

    (7) If you follow the advice of the author, Yes. What it does, I have it does not throw an exception if a value is missing in the validation of the line

    (8) usually you set whatever it is at the level of the OS and put only things on VO if you want to override the default value for a specific behavior


    Frank

  • How to extract the values of the line full in the bean to support using the primary key

    Hello

    I have a table that has columns as plant_name, business planner email id and identification of email resident engineer. Here, Plant_name is the primary key.

    Now, I have this plant's name slipped and dropped like selectonechoice (drop) on page jsff. In this user can select any name of 1 plant drop down.

    Right now, I can go get plant in backing bean name, but I can't understand how business plan for extraction and identification of email of the engineer resident in this key primary-plant_name at the bean to support.

    Please let me know if anyone has an idea in this regard.

    JDeveloper version 11.1.1.6.0

    Thanks in advance.

    Sneha

    Sneha211 wrote:

    On the jsff page

    required = "#{bindings." Plant.hints.Mandatory}.

    shortDesc = "#{bindings." Plant.hints.ToolTip}.

    ID = "soc1" unselectedLabel = "- Select -"

    autoSubmit = 'true '.

    Binding = "#{backingBeanScope.backingbean.plantbean}" > "

    ID = "si1" / >

    In backing bean

    DCBindingContainer = lBindingContainer

    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding lBinding = lBindingContainer.findIteratorBinding("SupplierVO1Iterator");

    NewRow row = lBinding.getCurrentRow ();

    String aamplant1 = (String) newRow.getAttribute ("Plant");

    Hi Sneha, you've written code for it

    you have found the current line and the primary key then this line, then why you not not using this same rank to get the other attributes?

    NewRow row = lBinding.getCurrentRow ();

    String aamplant1 = (String) newRow.getAttribute ("Plant");

    String businessPalnner = (String) newRow.getAttribute ("business_planner"); Returns the value of the same line

    Engineer in String = (String) newRow.getAttribute ("engineer");


    OR if your condition is like that-

    you have a primary key field value, but you do not have the corresponding line, then you can get that line and it's attribute by using the primary key value

    See - http://adfgouravtkiet.blogspot.in/2012/10/filtering-of-data-from-vo.html

    Hope it helps

    -Ashish

  • Too many objects correspond to the primary key oracle.jbo.Key

    I get this error: Too many objects match the primary key oracle.jbo.Key when I tried to look for in a display object where the primary key is consists of more than one filed.

    Use case:

    In Jdeveloper 11.1.2.3 I Entity object called someTable this table has three fields A,B and C where the primary key is consist class towing A and B .

    I created different towing View object of someTable object enity that are someTableVO1 and someTableVO2 . Rated A in the view object somtableVO1 is a List Of Value(LOV) and the data are coming form filed A in the someTableVO2 .

    In application I have a search page that contains a drop-down list of registered A in somTableVO1 . Based on certain conditions, the drop-down list of the values in the list is not static. The value of the drop-down list is editable based on a select query run on someTableVO1 and it is based on the class thried C is NOT part of the primary key .

    The page displays the drop down menu with the correct values. But I have a ValeChangeListener method that will be activated whenever the user selects a value form the drop-down list.

    The problem is:

    The error Too many objects match the primary key is occur whenever I am executing this method.

    Support:

    I think the problem is with multiple fields for the primary key. of curse, there is an overlap in a part of the primary key (IE that paid A or B ) but the combination of A and B are always unique.

    Notes:

    1. I check the query by executing SQL Developer and it shows not all duplicate values.

    2 I don't attach code, because I think that the problem is not on (how to) this is (what to do).

    I hope that the idea is clear

    Problem solved.

    My goal was to show a summer that A form someTableVO1 as a list of value and I was trying to achieve by creating the list of value the same form Entity object . I understand that it was the wrong approach (correct me if I'm wrong). to achieve this in ADF technology, I have to do the following:

    1. Simply to drag and drop the view object from the Data Controls page.
    2. List of options appears asking how you want to display the view object (shape, chart, table, only one selection,...).

    3. Select Single Selection ->ADF one Selection

    4. Select the attributes that you want to show the user a list of values.

    Thanks for your comments.

  • where can I use statement box put Null or not primary key or null in the result?

    create the table test_target

    (

    letter_grade varchar2 (2) null,

    grade_point number (3,2) not null,

    max_grade number (3).

    min_grade number 4

    );

    create the table test_source

    (

    letter_grade VARCHAR2 (3),

    grade_point number (3,2).

    max_grade number (3,2).

    min_grade number (3).

    created_by date,

    Modified_By date

    );

    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale, src.nullable src_nullable

    user_tab_columns CBC

    where table_name = 'TEST_SOURCE '.

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len, tgt.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable

    of tgt user_tab_columns

    where table_name = 'TEST_TARGET '.

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable

    the CBC

    outer join left tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    de)

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' (' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' || src_data_type |

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    end alter_statement

    of col_details

    )

    where alter_statement is not null;

    result:

    ALTER table TEST_TARGET change LETTER_GRADE VARCHAR2 (3) / / if it is null or not null primary key or want to see the result as alter table TEST_TARGET change LETTER_GRADE VARCHAR2 (3) null or not null or primary key

    ALTER table TEST_TARGET change the NUMBER of MAX_GRADE (3, 2)

    ALTER table TEST_TARGET change the MIN_GRADE NUMBER (3, 0)

    ALTER table TEST_TARGET add CREATED_BY

    ALTER table TEST_TARGET add MODIFIED_BY

    Please try:

    drop table test_target purge;

    drop table test_source purge;

    create the table test_target

    (

    letter_grade varchar2 (2) primary key,.

    grade_point number (3,2) not null,

    max_grade number (3) unique.

    min_grade number 4,

    MIN_AGE number 4

    );

    create the table test_source

    (

    letter_grade VARCHAR2 (3),

    grade_point number (3,2).

    max_grade number (3,2).

    min_grade number (3).

    created_by date,

    Modified_By date

    );

    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,

    CBC. Nullable src_nullable, decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as src_cons

    user_tab_columns CBC

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = Src.Column_Name

    where table_name = 'TEST_SOURCE '.

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len,

    TGT.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable,

    Decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as tgt_cons

    of tgt user_tab_columns

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = TGT. Column_Name

    where table_name = 'TEST_TARGET '.

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable, src_cons,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable, tgt_cons

    the CBC

    outer join full tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    de)

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' (' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    ||

    cases where tgt_nullable = 'Y' then 'null '.

    of another end 'not null '.

    || tgt_cons

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' || src_data_type |

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then nvl (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    || tgt_cons

    When src_col_name is null

    then 'alter table' | tgt_table_name: ' drop '. tgt_col_name

    end alter_statement

    of col_details

    )

    where alter_statement is not null;

    priamry key and unique key you choose user_contraints

    Check and change for your condition

    Concerning

    Mr. Mahir Quluzade

Maybe you are looking for

  • 10.7.5 upgrade 10.9 (or higher)

    Hi, I'm running on an OS X 10.7.5 and upgrade to a 10.9 or above an application I want to download. How is the best way to do it? I have 12 GB of memory.

  • defects of memory - full boot disk but nothing to delete?

    2.53 GB free of 59.44 Go and get "Startup disk is almost full." 43,62 GB OTHERS 11.26 GB APPS PHOTOS OF 1.61 GB 310,3 MB AUDIO MOVIES OF 97.8 MB BACKUPS OF 8.7 MB I can't find anyway to know what OTHER there or even remove it. Even after the apple a

  • infrared headphone

    I can (and how) use the old style infrared headphones with a 2nd generation Apple TV?  Now, if I turn on Apple TV, I hear what is coming through the TV feed.

  • Satellite A40-S435: the drive cannot burn CD-R/CD-RW but can read DVD-ROM

    Hellomy laptop is Toshiba A40-S435.I'm currently problems writing CD - R or CD - RW drive CD - RW?There is noise whenever I insert the CD - RW into the CD - RW drive!But able to read DVD-R and sometimes intermittent reading CD - R disc?Is - this CD -

  • Windows Vista constant freeze, crash and random reboot

    My Windows Vista computer is constantly freezing crashing (with blue screen) and sometimes restart automatically (and it's not because of Windows updates). I've had the computer for about a year and a half and it has been very good. Recently it start