Customized for a Unique constraint processing scripts

Hallo,

How can I create the Unique constraint (not a Unique Index) transformation scripts:

var key_column = 'KEY';
// get tables
tables = model.getTableSet().toArray();
for (var t = 0; t < tables.length;t++){
     table = tables[t];
     table_name = table.getName();
     abbr = table.getAbbreviation()+"_";
     key_col = table.getElementByName(key_column);
     if (key_col!=null){
          uniq = table.createIndex(); // it is right?
          table.setDirty(true);
          uniq.setName('UNIQUE'); // does not matter
          uniq.add(id3_col);
          uniq.setUK(true); // a method does not exist
          table.setUK(uniq);// a method does not exist
      }
}

regarding

Oleg

Hello Oleg,

lines 14 and 15 are false. The use of the persistence method is:

uniq.setIndexState ("Unique constraint");

Other options here - you can spot if you look at the XML file representing the table with PK and UK constraints and regular index - "primary constraint, «Unique Index ordinary', «Clear index»»

Philippe

Tags: Database

Similar Questions

  • Unique constraint violation error

    Hi all

    I have a procedure called - FHM_DASHBOARD_PROC which inserts data into a table called FHM_DASHBOARD_F retrieve records in multiple tables. However, for a particular type of record, these data are not inserted because of the Unique constraint violation

    the procedure is:
    create or replace
    PROCEDURE FHM_DASHBOARD_PROC AS
    
    DB_METRICS_CNT1Z number;
    --V_PODNAME varchar2(10);
    V_KI_CODE_DB_STATSZ varchar2(50);
    V_ERRORSTRING varchar2(100);
    
    --CURSOR PODNAME_CUR IS SELECT PODNAME,SHORTNAME FROM CRMODDEV.POD_DATA WHERE PODSTATUS_ID=1 AND PODTYPE_ID=1 ORDER BY PODNAME;
    
    
    -- DB STATS
    
    BEGIN 
    
      -- OPEN PODNAME_CUR;
        --   LOOP
          --   FETCH PODNAME_CUR INTO V_PODNAME,V_POD_SHORTNAME ;
            -- EXIT WHEN PODNAME_CUR%NOTFOUND;
    
               BEGIN
               
                     SELECT COUNT(*) INTO DB_METRICS_CNT1Z FROM FHM_DB_METRICS_F A, FHM_DB_D B where A.DBNAME=B.DBNAME and PODNAME=V_PODNAME AND DB_DATE=TRUNC(SYSDATE-1);
                               DBMS_OUTPUT.PUT_LINE('DB_METRICS_CNT1Z :'|| DB_METRICS_CNT1Z);
                               IF DB_METRICS_CNT1Z >0 THEN
                             
                        DBMS_OUTPUT.PUT_LINE('DB STATS');
                                  
                       INSERT INTO FHM_DASHBOARD_F(PODNAME,DASH_DATE,KI_CODE,KI_VALUE,KI_STATUS)
                                  
                          (SELECT PODNAME, DASH_DATE AS CU_DATE, KI.KI_CODE, NVL(PF.KI_VALUE,0), 
                                                                  CASE
                                                                   WHEN PF.KI_VALUE = ki.warning_threshold then 2
                        when PF.KI_VALUE=0 then 0
                        ELSE 1 
                        END  AS ALERT_STATUS
                        
                        FROM 
                        
                        (SELECT PODNAME,DB_DATE AS DASH_DATE,decode(a.stats_last_status,'SUCCEEDED',1,'FAILED',2,'STOPPED',2,NULL,0) KI_VALUE from  
                        FHM_DB_METRICS_F a,fhm_db_d b where a.dbname=b.dbname and podname='XYZ' and db_date=TRUNC(SYSDATE-1) and dbtype='OLTP')PF,
                        FHM_KEY_INDICATOR_D KI where PF.PODNAME=KI.POD_NAME AND KI.TIER_CODE=3 AND KI.KI_NAME='DB_STATS'
                        AND (PF.PODNAME,TRUNC(PF.DASH_DATE),KI.KI_CODE) NOT IN (SELECT PODNAME,DASH_DATE,KI_CODE FROM FHM_DASHBOARD_F)); 
                                 COMMIT;
                     
                             ELSE
                                    SELECT KI_CODE INTO V_KI_CODE_DB_STATSZ FROM FHM_KEY_INDICATOR_D WHERE POD_NAME=V_PODNAME AND KI_NAME='DB_STATS';
                                     DBMS_OUTPUT.PUT_LINE('V_KI_CODE_DB_STATSZ :'||V_KI_CODE_DB_STATSZ);
                                     INSERT INTO FHM_DASHBOARD_F(PODNAME,DASH_DATE,KI_CODE,KI_VALUE,KI_STATUS) VALUES(V_PODNAME,TRUNC(SYSDATE-1),V_KI_CODE_DB_STATSZ,0,0); 
                                     COMMIT; 
                                     
                             END IF;
                            
         EXCEPTION
                            WHEN OTHERS THEN
                            V_ERRORSTRING :='INSERT INTO FHM_DASHBOARD_F_ERROR_LOG(POD_NAME,KI_NAME,ERRORNO,ERRORMESSAGE,DATETIME) VALUES
                   ('''||V_PODNAME||''',''DB_STATS'','''||SQLCODE||''','''||SQLERRM||''',SYSDATE)';                         
                   EXECUTE IMMEDIATE  V_ERRORSTRING;
                            COMMIT;
              END;
    
          --END LOOP;
      --CLOSE PODNAME_CUR;
    
    
    END;
    
    
    END FHM_DASHBOARD_PROC;
    and the table where data integration is
    CREATE TABLE "CRMODDEV"."FHM_DASHBOARD_F"
      (
        "PODNAME" VARCHAR2(25 BYTE) NOT NULL ENABLE,
        "DASH_DATE" DATE,
        "KI_CODE"   NUMBER NOT NULL ENABLE,
        "KI_VALUE"  NUMBER,
        "KI_STATUS" NUMBER,
        CONSTRAINT "FHM_DASHBOARD_F_DATE_PK" PRIMARY KEY ("DASH_DATE", "PODNAME", "KI_CODE") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS STORAGE(INITIAL 4194304 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CRMODDEV_IDX" ENABLE,
        CONSTRAINT "FHM_DASHBOARD_F_KI_CODE_FK" FOREIGN KEY ("KI_CODE") REFERENCES "CRMODDEV"."FHM_KEY_INDICATOR_D" ("KI_CODE") ENABLE
      )
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE
      (
        INITIAL 3145728 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
      )
      TABLESPACE "CRMODDEV_TBL" ENABLE ROW MOVEMENT ;
    the constraint primary key is FHM_DASHBOARD_F_DATE_PK and is on 3 columns of the table, DASH_DATE, PODNAME, KI_CODE



    And it's the query used in the procedure to insert the data into the table
    (SELECT  PODNAME, DASH_DATE AS CU_DATE, KI.KI_CODE, NVL(PF.KI_VALUE,0), 
                                   CASE
                                   WHEN PF.KI_VALUE = ki.warning_threshold then 2
    when PF.KI_VALUE=0 then 0
    ELSE 1 
    END  AS ALERT_STATUS
    From 
    (Select  Podname,Db_Date As Dash_Date,Decode(A.Stats_Last_Status,'SUCCEEDED',1,'FAILED',2,'STOPPED',2,Null,0) Ki_Value From  -- Added Distinct
    FHM_DB_METRICS_F a,fhm_db_d b where a.dbname=b.dbname and podname in ('XYZ') and db_date = TRUNC(SYSDATE-2) and dbtype='OLTP')PF,
    Fhm_Key_Indicator_D Ki Where Pf.Podname=Ki.Pod_Name And Ki.Tier_Code=3 And Ki.Ki_Name='DB_STATS'
    And (Pf.Podname,Trunc(Pf.Dash_Date),Ki.Ki_Code) Not In (Select Podname,Dash_Date,Ki_Code From Fhm_Dashboard_F));
    It gives * record * 2 suite
    ---------------------------------------
    XYZ JANUARY 20 12 2521 1 1
    XYZ JANUARY 20 12 2521 1 1

    It gives the Unique constraint violation error when inserting. Then, I changed in the above insertion code by adding a distinct clause. Once the query gives only a SINGLE record accordingly. However, this record is not be inserted into the table and give the same error.

    Now the question is how should I insert that record into the table with success?


    If the message is too long, however, I gave you the real structure of the object or procedure and error.

    Thank you in advance.

    When you have 5 columns in the game adding THAT SEPARATE is n ot solution that you can still get the same error once.

    Check the target table if the data exists before inserting... If this is not the case, check the structure of the table for a unique constraint created on other columns.

    select *from 
    where
    DASH_DATE=date '2012-01-20'
    and PODNAME='XYZ'
    and  KI_CODE=2521;
    
  • Looking for hosting companies with web form processing scripts

    I'm a beginner when it comes to creating web pages.  I have created a website for the first time and am looking for a Web host that can provide the form processing scripts.  I'll try HostGator, but when I asked about it on their online chat, the lady who answered said that they do not have what I was looking for.  Due to technical difficulties with their online chat program, I don't have a chance to ask follow-up questions, but I had the impression that the Lady, that I was talking knew what she was talking about.

    I would ask here.  It is my understanding that if you have forms on your website, you need form processing scripts to run.  Can you name of hosts which can give them?  Is this something that most web hosting companies can normally provide?  Are there any that you would recommend for someone like me who will use forms on their web site?

    I think your priorities for web hosting should be based on other more important criteria - availability, services, space and affordability.

    Canned scripts are a secondary issue.  Practice for beginners, Yes.  But generally UN os without any room for customization.

    Not my favorite web host, GoDaddy shared Linux Web & map of classic accommodation offers 2 PHP scripts for forms of contact only.

    With the help of our shippers of PHP on the Web & hosting classic form. Web & classic accommodation - GoDaddy help

    If you make detailed surveys or questionnaires, you will need custom scripts that does any hosting company.   You buy or build scripts to your specifications.

    What to look for in the accommodation:

    • Shared on Linux/Apache servers
    • Dedicated IP address
    • E-mail accounts
    • Allocation of storage, memory & sufficient bandwidth
    • PHP MySQL & or Maria db
    • 24/7 technical support
    • History of reliable availability

    Other optional bells & whistles:

    • C - Panel
    • phpMyAdmin
    • Database Wizard
    • 1 - click installation of WordPress & others
    • Maintenance plan
    • Free upgrades patches / security
    • Backups...

    Nancy O.

  • Get the "unique constraint" error while mapping custom jsp

    Hello

    We are implementing iStore R12 (12.1.3).

    We have customized ibeCCtdMenu.jsp, renamed as xxibeCCtdMenu.jsp and moved to $OA_HTML / folder.

    Now in the template Manager, we create a new source (xxibeCCtdMenu.jsp) file to the title of "model of generation of Menu".

    However when we select site and language like 'All', it gives following error:
    Error in the logical record of physical mapping
    ORA-00001: unique constraint (IBE. IBE_DSP_LGL_PHYS_MAP_U2) violated in the package IBE_PhysicalMap_GRP procedure save_physicalmap
    All the sites and all the language already exists exists for 7670 deliverable

    How can we overcome them this error? Please notify.
    Thank you
    Vivek

    for a given Site and the language combination, can exist only one model.
    Default file provided by Oracle is set with combination like all Sites - all languages, and you will not be able to change it.

    Save your file with combination such as all Sites - English
    or , all languages.

    Then it will work fine.

    Hrishikesh

  • correct handling of foreign keys in unique constraints for operations ON DELETE SET NULL

    During my troubleshooting at a client site, I came across an interesting setup where I would like to ask your opinion.


    Consider two tables ADTB and TBLB.

    ADTB:

    INT COLA1

    COLA2 INT

    TBLB:

    COLB1 INT

    COLA2 is COLB1 as a foreign key ON DELETE SET NULL value.

    COLA1 and COLA2 are combined into a UNIQUE for the BATTERY constraint.

    I have two records of TBLB:

    (1)

    (2)

    and two DRUM recordings:

    (1, 1)

    (2, 2)

    so far, all the constraints are valid.

    During my research, I learned that I can not put COLA2 null in ADTB for two lines at the same time:

    TBLA UPDATE set COLA2 = NULL where COLA1 = 1;

    -> OK

    TBLA UPDATE set COLA2 = NULL where COLA1 = 2;

    -> VIOLATED UNIQUE CONSTRAINT

    Unfortunately, it's something my application needs, anyway. In order to get this resolved, but I try to understand, what would happen if I:

    REMOVE THE TBLB;

    ?

    It should set COLA2 in ADTB "Null" on the two lines, which is not allowed due to the UNIQUE CONSTRAINT.

    Can someone shed light on this issue? Thank you.


    Yours,

    Ronny

    Unfortunately, as you say, you can't not NULL values in such a unique constraint.  It would be the same as if you had a composite primary key and try to allow one of the columns will be null in several rows with the same value in the other column.  NULL is treated as an "unknown" value, it is possible that it could be the same value (it may or may not be, but Oracle does not know), so it must assume that it might be and that's why treat it as if there is the potential for a duplicate... so it's not unique.

    In short, do not allow null values in your unique constraints.

    The default is in the drawing, not in the way that Oracle is the treatment.  Fix the design if you do not have NULL values.

    In terms of relational database design, it seems that you are trying to transform the 1:M relations M:M relations, and which requires an intermediate table if you have M:1 and 1:M between 3 tables instead.

  • (ORA-00955) conflict of naming for index and constraint when you use a unique index (.. desc,.. CSA)

    Hello

    indexes and constraints are in different namespaces, so it should be possible to give them the same name.

    In the following case that apparently does not work:

    create unique index orders_year_show_uq
      on orders (year desc, show_orders asc);
     
     alter table orders
      add constraint orders_year_show_uq unique (year, show_order);
    

    When I run these statement, I get a "SQL Error: ORA-00955: name is already used by an existing object". ""

    If I clean and I execute the same instructions as above with the only difference on the 2 line, using "asc year" instead of "year desc":

    
      on orders (year asc, show_orders asc);
    

    then it success.

    I can't explain it, you have an idea?

    Thanks in advance.

    Kind regards

    Giovanni

    First of all, you have show_orders in index and show_order in the constraint. I'll assume that it's a typo. Second, when you create constraint without index enhance the specification Oracle seeks indexes existing on the same set of columns in ascending order. If this index does not exist (and it's your case, since one of your columns to index is in descending order), Oracle tries to create one with the same name as the constraint. That's why you get ORA-00955: name is already used by an existing object. In general, you can specify explicitly the index name to force the Oracle by using the existing index. But it will not help you. If you issue

    ALTER table orders add unique constraint (year, show_orders) orders_year_show_uq using index orders_year_show_uq;

    You will get the ORA-14196: specified index cannot be used to apply the constraint.

    In any case, Oracle does not support using index DESC for PK/UK.

    SY.

  • Unique constraint with condition - validation of EO levels

    I have a table
    create the CUSTOMER table (key number primary client_prefix,)
    client_suffix Varchar2,
    Number of NIN,
    status number (1).
    . . . . . . . .
    . . . . . . . .);


    I have an obligation to respect a unique constraint where NIN THAT must be unique for the Client_suffix, but the issue is that customers in rejected status
    (status = 9 means that the customer is in rejected status) should be ignored.

    It is a new customer can be created with the same client_suffix, combination of NIN has provided other customers
    with the same combination have rejected status. If not, can not be created.

    I've already implemented this in the database level. I would like to know how this can be implemented as a validation of EO levels

    Jdev version 11.1.2.0.0

    No, you don't need to do...

    Use this technique: http://docs.oracle.com/cd/E26098_01/web.1112/e16182/bcadvgen.htm#sthref439

    John

  • Unique constraint on the values in both directions

    I'm looking to create a unique constraint that works in two ways. Say I got a constraint unique in columns 1 and 2. I want it to be impossible for the two lines below the two exist at the same time. Is there a way to do this? I googled around for a while now and I found nothing that works so far.

    Header 1 Header 2
    DogCAT
    CATDog

    Hello

    You can create an index based on a single function:, like this:

    CREATE UNIQUE INDEX table_x_header_1_header_2

    ON table_x (LESS (header_1, header_2)

    More LARGE (header_1, header_2)

    );

    How will you use these values?  You might be better to simply create a regular old unique constraint, but also have a CHECK constraint to ensure that header_1<= header_2. ="" that="" way,="" when="" you="" want="" to="" search="" for="" the="" combination="" ('cat',="" 'dog')="" you="" won't="" have="" to="" search="" for="" ('dog',="" 'cat')="">

  • Index naming standards does not and unique constraints

    I found yet another question of naming standards

    I have tried to create a unique constraint as a normal index via the unique constraints and indexes in Properties of Table with the assumption that it will use the design properties of models.  This isn't.

    Naming Standard Template.jpg

    As noted in the image of the model above, my Unique constraint model is {table} _ {columns} lancement_remarques

    and my model of Index idx _ {columns} {table}.  Yet, when I try to create the Unique constraint, it creates the naming convention in names like CUSTOMER_ADDRESS__UK (2 lines of underscore?) as shown below.

    Table_Props_Unique_Constraint.jpg

    My assumption is that he needed a column, so I added the column and also applied the rules naming - nothing.

    Table_Props_Unique_Constraint_w_Column.jpg

    Is my wrong assumption on these constraints being appointed through the models?  If this is not the case, what naming rules is in this context?

    The same behavior is evident when you try to create index.

    I get not all comments on my posts.  Are these bugs or just user error?

    Hello

    Thank you to report the problem, I logged a bug. You can get 'Rules of naming' works properly if you press the button 'Apply' before that.

    I get not all comments on my posts.

    I don't think that anyone (or any job) has been ignored on this forum. Depending on the complexity of the problem and our current commitment (other urgent tasks, holidays, time zone), you can get answer almost immediately or after a certain time.

    It is useful for us, if you mark your messages as replied if you get the right answer.

    Philippe

  • Unique constraint in the form of master detail error

    Hi all

    I need help, the following requirement.

    I have a master detail form developed on master-child table. the tables have the composite key.

    Old masters has a composite key on columns (A, B)

    Children table has a composite key on columns (A, B, C)

    Child block look something like below

    C       A          B

    10 AAA 1000

    20 1300 BBB

    30 CCC 1400

    40 DDD 1200

    Increments of column C with 10 for each record, and if a new record is insert in intermediaries the records it is incremented to 5.

    My requirement is when an end user attempts to insert record between 20 and 30 or 30 and 40 and clicks on save, the value of the C column must regenerate as shown below

    C       A          B

    10 AAA 1000

    20 1300 BBB

    XXX 30 900

    40 CCC 1400

    50 DDD 1200

    Button Save I wrote the following code

    Declare
      ln_Count NUMBER :=0;
      ln_c number :=0
      cursor c1 is
      select c
      from child
      where a=:child.a
      and b=:child.b
    Begin
      Go_Block('Child');
      First_Record;
      LOOP
      ln_Count:= ln_Count+10;
      :child.C := ln_Count;
      EXIT When :System.Last_Record = 'TRUE';
      Next_Record;
      END LOOP;
    
    
      For c_cur in c1 Loop
      update child
      set c:=ln_c+10
      where a=:child.a
      and b=:child.b 
      and c=c_cur.c
      end loop;
      Forms_DDL('commit');
         
         commit_prc('Commit');  -- We have our own program unit to call commit_form
    
    END;
    

    I tried above in a way because, before approving the changes to the table, I update the existing values in the table of the C column so I would not get unique constraint error.

    When you click the button Save, I get a constraint exception. Hope I made my requirement clear.

    Can someone give me a clue to this implementation.

    Thank you

    malandain

    With this update, all your C-columnvalue became negative. When you post the form thereafter, forms update agaion records one by one the new positive figures. Because the numbers of 'old' in the db are now negative, there will be no violation-UK.

  • How to display a validation on a modal dialog error based on a unique constraint?

    Hi all

    Apex 4.1

    See example on apex.oracle.com:

    Workspace: EDIAZJORGE

    User name: TEST

    Password: test123

    Application: 55036 - Validation of modal Page

    I have a page with two elements, to make and model, where the user will be able to enter the model, say, a car and use a pick to dolist. If make does not exist, the user can click on the [+] button that opens a modal dialog box to add a new do.

    Everything works fine except when I try to insert a double do, which triggers a unique constraint violation error:

    AJAX call back Server error ORA-00001: unique constraint (EDIAZJORGE. MAKE_UK1) violated to execute the PL/SQL Code

    I want to enter this event and inform the user about an error inside the modal dialog box, but I don't know what is the best way to achieve this. My guess is that I'll have to make an Ajax call to run an application process and capture the exception of DUP_VAL_ON_INDEX, but I'm not very familiar with the Ajax part.

    Any suggestions?

    Thank you

    Erick

    I'm sorry Erick, I was in error. You always get an alert but with a nicer message. The actions of builtin DA do not allow interaction with them, so no way to manage the return of ourselves.

    In light of this, I copied the page in enforcement 77635 1-2 and made some changes to it. Basically, I copied the code to Jorge and modified so that it uses $.ajax instead of apex.server.process. I much prefer it to htmldb_Get - you shouldn't really use it either. More $.ajax has the advantage of this apex.server.process is based on it. That should work well on 4.1.

    Sorry Jorge, won't steal the Thunder, I guess I was... bored? And decided to do some apex?

  • Oracle DB: Check Unique constraints before award of sequence (ID)

    Hello!

    I am building a Java web application using JPA.

    I used to fill the table IDs, sequences of generators, reported through DB and javax.persistence annotation (@Sequence).

    Some tables have simple unique constraints (example: Table_Country: Country column "country_name" must be Unique).

    At the time of execution, trying to persist a country name that is already in my Table_Country, java will throw exception: OK. But I noticed: before that, DB has allocated a sequence ID to my object.

    My question is: there's way (apart from making programmatic or triggers for and during the audit) of database to check unique constraints before award of sequence?

    Thanks in advance!

    My question is: there's way (apart from making programmatic or triggers for and during the audit) of database to check unique constraints before award of sequence?

    No - for several reasons.

    1. the real constraint is not verified by Oracle until you provide the values you are using Oracle.

    2. If you try to perform the audit before giving the value to Oracle another user could enter this value and insert it before you and which would still cause your problem.

    Oracle is a multi-user system. Even if you try to "look" at the next value in the sequence other users could easily allocate this value until you can get it so the value you 'read' would really not be the value you get.

    You can't tell what the value of the next sequence will be except by actually calling NEXTVAL to return.

    As others have said it seems that yours is a JPA number.

  • Question of the unique constraint with finance charge

    Hi friends,

    As part of the implementation of 11 g BIAPPS-ODI during the execution of a finance charge is my load of CM plan failed with the error like below

    ODI-1519: series step 'Load start Plan (InternalID:1242500)' failed because step 'Refresh Global Variable (InternalID:1243500)' child is in error.

    ODI-1519: series step 'Refresh Global Variable (InternalID:1243500)' failed because the step child "Warehouse loading Phase (InternalID:2336500)" is a mistake.

    ODI-1519: series step "Warehouse loading Phase (InternalID:2336500)" failed because the child step "SIL 1 charge (InternalID:2337500)" is a mistake.

    ODI-1519: series step '1 SIL Load (InternalID:2337500)' failed, because the child step '2 group of dimensions of SIL (InternalID:2338500)' is a mistake.

    ODI-1519: series step '2 group of dimensions of SIL (InternalID:2338500)' failed because the child step "Parallels - independent DimGroup (InternalID:2346500)" is a mistake.

    ODI-1518: parallel step 'Parallels - independent DimGroup (InternalID:2346500)' failed. level of 1 child by mistake, which is more than the maximum number of allowed errors (0) defined for parallel step.  Has no measures of the child: 3 SIL Dims POSHIER_DIM (InternalID:2369500)

    ODI-1519: series step '3 SIL Dims POSHIER_DIM (InternalID:2369500)' failed because the child "POSHIER_DIM (InternalID:2372500)" is a mistake.

    ODI-1519: series step "POSHIER_DIM (InternalID:2372500)" failed because step "SIL_PositionDimensionHierarchy (InternalID:2377500)" child is in error.

    ODI-1217: SILOS_SIL_POSITIONDIMENSIONHIERARCHY Session (4278500) fails with return code 1.

    ODI-1226: SIL_PositionDimensionHierarchy.W_POSITION_DH step fails after 1 attempt.

    ODI-1240: Flow Run SIL_PositionDimensionHierarchy.W_POSITION_DH fails during an operation of integration. This flow of charge table target W_POSITION_DH.

    ODI-1228: SIL_PositionDimensionHierarchy.W_POSITION_DH (integration) of the task fails when connecting ORACLE target BIAPPS_DW.

    Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV_DW. W_POSITION_DH_U2) violated

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)

    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1895)

    to oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$ 2.doAction(StartScenRequestProcessor.java:580)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:512)

    to oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$ StartScenTask.doExecute (StartScenRequestProcessor.java:1068)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:137)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    How to solve the question above using ODI 11 g. I'm using Oracle ERP R12.1.3 as a source of data for this.

    Thanks in advance.

    Kind regards

    Saro

    What is the result of a query on table W_POSITION_DH or W_POSITION_D duplicate?

    Naeem

  • What is javascript customized for converting an estimate of the numerical value in equivalent term?


    Hello fellow Adobe users,.

    I'm trying to find a way to see the numerical value of average and presents its equivalent word.  Rather than display the number, it should show the following:

    A numeric score from 3.1 to 4 should show as pending

    A digital index of 2.1 to 3 should show meets expectations

    A numeric score from 1.5 to 2 should show as below performance

    A rating of 1 to 1.4 should show as failure

    Should what simple javascript I type the javascript custom in the text field properties?

    Looking forward to your comments.

    Thanks in advance!

    Jonathan

    You have a field that is the calculation of this average in number? Let's say you do and it's called 'average '. You can then use this code as the custom for the field "Average in the words:" calculation script

    event.value = "";
    var a = +this.getField("Average").value;
    if (a>=1 && a<=1.4) event.value = "Fail";
    else if (a>=1.5 && a<=2) event.value = "below performance";
    else if (a>=2.1 && a<=3) event.value = "Meeting Expectations";
    else if (a>=3.1 && a<=4) event.value = "Outstanding";
    
  • Retrieve values with a unique constraint

    All,

    It may be a stupid request and I think too speak of it. But, for some reason, I am unable to write a query to accomplish my task.

    I have the T table with some columns and the columns c1, c2, c3 are part of a composite unique constraint. Now I'm updating the value c3 from 52 to 51. But, when I do an update like:

    Update T set c3 = 51 where c3 = 52;

    I get a Unique constraint violation error.

    So, I need to know what are the values of repetition that might be causing this?

    Thanks in advance guys.

    34a22dde-3108-4F05-BE72-eb1043d28314 wrote:

    All,

    It may be a stupid request and I think too speak of it. But, for some reason, I am unable to write a query to accomplish my task.

    I have the T table with some columns and the columns c1, c2, c3 are part of a composite unique constraint. Now I'm updating the value c3 from 52 to 51. But, when I do an update like:

    Update T set c3 = 51 where c3 = 52;

    I get a Unique constraint violation error.

    So, I need to know what are the values of repetition that might be causing this?

    Thanks in advance guys.

    An inelegant way...

    select *
    from your_table tab1
    where (tab1.c1,tab1.c2) in
    (
    select tab2.c1, tab2.c2
    from your_table tab2
    where tab2.c3 = 52
    )
    where tab1.c3 = 51;
    

Maybe you are looking for

  • Why Thuderbird stopped sorting emails by date and added a new sort of his method?

    Yesterday, my emails have been sorted in strict chronological order. Today, they are classified by subject and by date and are in reverse chronological order - oldest first. If all the mails I received from a person in the last two months are grouped

  • replacing the hard drive G62

    So, I got the error hard drive 1 303 and discovered that means that my hard drive went bad. I would like to get another hard drive has the same amount of space or more. I would also like to know what type of ram is compatible with my laptop for later

  • Extraction of a two disc set.

    I have Vista with Windows Media Player 11.  I have a two-disc album, I'm tearing.  Each disc has 15 songs.  When I tear the first dics, it appears with the titles and artists of the second disc.  Music and the times are correct.  When I tear the seco

  • How Cain I connect my application to sql

    Hi all. I create my application in Momentics IDE as a qml file. When I used this code in my main.cpp im getting error and nothing happens. https://developer.BlackBerry.com/native/reference/Cascades/bb__data__sqlconnection.html so please teach me the

  • What is the right time to call the pushScreen()?

    Hello I made a screen that simply indicates "Loading"... "while my app works through its processes. the problem is that the screen never had pushed until after the function when pushScreen() is back. the call looks like this: function func() { //I'm