Allowing Duplicates in PK table

Hello,
I have a PK index table with unique constraints. How can I configure this index to allow duplicate values? Can this be done at the SQL Plus command line? Please advise.

Very Simple just Drop the primary key/unique constraint.
Daljit Singh

Similar Messages

  • Fact Table allows duplicate records

    Is Fact Table allows duplicate records?

    What do you mean by duplicate records? It could be what appears duplicate to you is having some other technical key info that are different in the fact table.
    At technical level, there wouldn't be duplicate records in fact table [in SAP's BW/BI there are two fact tables for each cube - which can itself cause some confusion]

  • Primary key allows duplicate entry in data dictionary

    Hi Friends,
                     I have created table to save contact details. here i have assigned USERID and CELL_NO as primary key but when i am trying to create new entry it allows duplicate value. How can i prevent this ?
    Please review my attached image for more details.
    Thank you Friends.

    Hi Karthi,
                  I think table logic is correct. it mean if you entered both primary key same only it wont allow but here you mentioned same cell no but different ID so it will accepts.
    E.g
         cell no 1234
         user id  xxx
         cell no 1234
        user  id xxx
    above logic wont allows
    but you mentioned
    cell no 1234
    user id xxx
    cell no 1234
    user id xyz
    if you need to remove duplicates mean you should maintain primary key as cell no only not both..
    revert back if you didnt get clear.
    Regards,
       Thangam.P

  • SQLLDR direct path allows duplicates in primary key

    I would like to use sqlldr direct path to load millions of records in the table but direct path allows duplicates on the primary key constraints.
    inserts duplicates
    sqlldr deploy_ctl/deploy_ctl@dba01mdm control=ctl_test.ctl direct=true
    primary key is enabled
    I am not understanding the behavior that why primary key is still enabled -- (logically it should have disabled than inserted duplicates)
    does not insert duplicates
    sqlldr deploy_ctl/deploy_ctl@dba01mdm control=ctl_test.ctl
    primary key is enabled
    Please can I know if there is any work around to use direct path with primary constraints in place.

    Dear,
    Look at the following example
    mhouri.world> drop table t1;
    Table dropped.
    mhouri.world> create table t1 (id number);
    Table created.
    mhouri.world> alter table t1 add constraint t1_pk primary key (id);
    Table altered.
    mhouri.world> select table_name, index_name, status
      2  from user_indexes
      3  where table_name = 'T1';
    TABLE_NAME                     INDEX_NAME                     STATUS           
    T1                             T1_PK                          VALID            
    mhouri.world> select count(1) from t1;
      COUNT(1)                                                                     
             0                                                                      and here call sqlldr
    C:\>sqlldr xxx/xxx@xxxx control=c.ctl bad=c.bad direct=trueAnd see what happen to the primary key index
    mhouri.world> select count(1) from t1;
      COUNT(1)                                                                     
             4                                                                     
    mhouri.world> select * from t1;
            ID                                                                     
             1                                                                     
             2                                                                     
             2                                                                     
             3                                                                     
    mhouri.world> select table_name, index_name, status
      2  from user_indexes
      3  where table_name = 'T1';
    TABLE_NAME                     INDEX_NAME                     STATUS           
    T1                             T1_PK                          UNUSABLE         
    mhouri.world> alter index t1_pk rebuild;
    alter index t1_pk rebuild
    ERROR at line 1:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found The primary key index is made unusable and this is why you have duplicate records
    best regards
    Mohamed Houri

  • Allowing duplicate in FOR ALL ENTRIES statement

    Hi folks,
            I am using a select query using FOR ALL ENTRIES statement. I could observe one entry is missing from the table data.When i checked that in the data base table, there are two duplicate records among which one entry is missed in the output data from the query.Is duplicates are restricted if we use FOR ALL ENTRIES statement ? Is there any key word like 'ALLOWING DUPLICATES' for this ? if not what is the solution for this.Could any body help me regarding this.
    Thanks,
    Shyam.
    Edited by: Matt on Jul 9, 2009 1:27 PM

    Hi Shyam,
    In For all entries you should give unique records only.
    sort your base table with key which you are passing in for all entries clause.
    delete all duplicate entries.
    Hope this will help .
    Regards,
    Vijay

  • Allowing duplicate members in outline or anything else?

    Essbase 9.3.1 + OBI EE 10g
    I have such dimension in outline
    Dim1
    -Par1(+)
    -Child1(+)
    -Child2(+)
    -Child3(+)
    -Par2(~)
    -Child1(+) (shared)
    -Child2(+) (shared)
    -Par3(~)
    -Child2(+) (shared)
    -Child3(+) (shared)
    and also have dimension Period
    Period
    -Year1(+)
    -mon1.Year1(+)
    -mon2.Year1(+)
    -mon12.Year1(+)
    -Year2(+)
    -mon1.Year2(+)
    -mon2.Year2(+)
    -mon12.Year2(+)
    and have dimension Measures
    Measures
    -cost(~)
    Problem:
    "Child1", "Child2" and "Child3" are the children of the "Par1" for all of the "Years"
    "Child1" is the child of the "Par2" for all of the "Years"
    "Child3" is the child of the "Par3" for all of the "Years"
    But "Child2" is the child of the "Par2" when the period="Year1"
    and "Child2" is the child of the "Par3" when the period="Year2".
    So when the combination is Year1->Par2.Child2->cost i want to see the real result and when the combination is Year2->Par2.Child2->cost i want to see #Missing or Zero(0).
    But when i use shared members i always get decimal result even if i apply formula to cost(depending on value of the Period dim) because physically the is only one value for all of the shared members in database.
    Instead of shared members to solve this problem I can add to children of "Dim1" the name of their parents(ex. "Child2(Par2)" and "Child2(Par3)") and then apply specific formulas to "cost". But business users dont want to see these addings and cut them in their reports.
    So if i allow essbase to use duplicate members will it resolve my problem or there are another ways to do it?

    Hi again.
    Use this method (without allowing duplicate members) and unfortunately cant stay with it.
    1. I always create aggregational views after importing the data into cube.
    But now after arrgregation i cant open dim Country.(got the error "Cannot send data") in EAS and OBI. In essbase.cfg two parameters(NetDelay.. and NetRetry...) are equal 75000.
    Made two tricks in windows registry - the same. Understood that it was because of one member of level 1(c99) which has 228 childen and each children has such formula
    "IIF(substring([Times].CurrentMember.Member_Name,3,4) ="02",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="03",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="04",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="05",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="06",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="07",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="08",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="09",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="10",c732,IIF(substring([Times].CurrentMember.Member_Name,3,4) ="11",c732,MISSING))))))))))"
    after filtering on all other members(even together) i got the result. But i dont understand why...Other 14 level-1 members also has children(max 178) and they queries normally.
    More detailed dim Country
    Country(Hierarchies Enabled)
    -c00(stored)(+)(256 members)
    --c100
    --c103 
    --c900
    -c10(Dynamic)(~)(10 members)
    --c100(c10)(+)(formula above)
    --c300(c10)(+)(formula above)
    -c20(Dynamic)(~)(178 members)
    --c100(c20)(+)(formula above)
    --c200(c20)(+)(formula above)
    -c99(Dynamic)(~)(228 members)
    --c100(c99)(+)(formula above)
    --c200(c99)(+)(formula above)
    If i dont make aggr views i got the result even with "c99" in different combination (but sometimes also got the error "cannot send data")
    2. But the main trouble is obiee pivot table.
    If i choose level-2 members of this dim with different measures and other dim members it shows the result.
    But after i set function SUM(before, after etc) in pivot i get "no data found".
    except stored member "c00" - with it i get my SUM.
    If i add filer with ONE! year inside i get my SUM. If more than one or none - "no data found"
    except stored member "c00" - with it i get my SUM.
    So now i see only one way...The whole dim Country is Stored
    In Measure "Cost" i add big formula like "IIF(substring([Times].CurrentMember.Member_Name,3,4) ="02" and IIF([Country].CurrentMember.Member_Name,3,4) ="c100(c10)", c100...
    for each member...and there will be a lot of measures (CostN...) course the formula is very huge...

  • Deleting Duplicates from a table

    Its a huge table with 52 fields and 30k rows. I need to delete the duplicates based on one of the fields. GROUP BY is taking a lot of time. Is there a quicker way to delete the duplicates using SQL.
    Thanks.

    How many duplicates have you got? Do you have even a vague idea? 1%? 20%? 90%?
    One way would be to add a unique constraint on the column in question. This will fail, of course, but you can use the EXCEPTIONS INTO clause to find all the ROWIDs which have duplicate values. You can then choose to delete those rows using a variant on teh query already posted. You may need to run %ORACLE_HOME%\rdbms\admin\utlexcptn.sql to build the EXCEPTIONS table first.
    This may seem like some unnecessary work, but the most effective way of deleting duplicates from a table is to have relational integrity constraints in place which prevent you having duplicates in the first place. To paraphrase Tim Gorman, you can't get faster than zero work!
    Cheers, APC

  • Overlapping Number Ranges for GL Accounts - does this allow duplicates?

    Hi there,.
    I am just-trying to understand GL numbering ranges.
    If I create two GL account groups with overlapping number ranges, what (if anything), is stopping me from creating two GL accounts with identical numbers. 
    When l try to do this in fs00 I get a message telling me that the account already exists in the company code. Surely having the concept of an account group with overlapping number ranges implies that the account group forms part of the GL account's unique key and therefore allows duplicate GL account numbers.
    Or does overlapping mean the ranges ovelap but the GL account numbers have to be unique?
    Confused
    Gerald.
    Edited by: Gerald Dunn on Apr 26, 2011 6:57 PM

    Hi,
    Since a chart of accounts contains many different types of accounts, they can
    be grouped into different account groups. Usually, one account group groups
    accounts with the same tasks within the general ledger, for example, cash accounts,
    material accounts, asset accounts, profit and loss statement accounts, and so on.
    By assigning a number range to an account group, you can ensure that accounts
    of the same type are within the same number range. Number intervals for G/L
    account master records can overlap.
    You must enter the account group in the chart of accounts segment; it controls the
    appearance of the company code segment of a G/L account. For example, for all
    of your cash accounts, you want to be able to display all of the line items. In
    Customizing, you therefore alter the field status for your “Cash Accounts” account
    group to make “line item display” a required entry field.
    Thanks
    R.K

  • Duplicates in the table

    hi,
    how to find the duplicates in the table in the below example
    Id     Empfirstname     Empfirstlastname     empdesig
    1     Xyz     Abc     Software Engg
    2     Xyz     Abc     Software Engg
    3     Kkk     Ddd     Architect
    need query to display
    1     Xyz     Abc     Software Engg
    2     Xyz     Abc     Software Engg
    duplicate records

    In addition:
    You might want to think about the 'upper-/lowercase-thing' and still being/being not duplicate in these cases.
    If so, then spot the difference:
    MHO%xe> select * from
      2  (
      3  with all_your_data_are_belong_to_us -- generate some data on the fly here
      4  as (
      5      select 1 Id,  'Xyz' empfirstname,  'Abc' emplastname, 'Software Eng' empdesig from dual uni
    on all
      6      select 2, 'Xyz', 'Abc', 'Software Eng' from dual union all
      7      select 3, 'aaa', 'AAA', 'Fairy' from dual union all
      8      select 4, 'AAA', 'aaa', 'Fairy' from dual union all
      9      select 5, 'Zlad', 'Molvania', 'Electrician' from dual union all
    10      select 6, 'Kkk', 'Ddd', 'Architect' from dual
    11     )
    12  select id
    13  ,      empfirstname
    14  ,      emplastname
    15  ,      empdesig
    16  ,      count(*) over ( partition by upper(empfirstname), upper(emplastname), upper(empdesig)
    17                         order by 'geronimo' ) rn
    18  from   all_your_data_are_belong_to_us  --<< this could be YOUR table name, if so, omit the with-clause! ;-)
    19  )
    20  where rn > 1;
            ID EMPF EMPLASTN EMPDESIG             RN
             3 aaa  AAA      Fairy                 2
             4 AAA  aaa      Fairy                 2
             2 Xyz  Abc      Software Eng          2
             1 Xyz  Abc      Software Eng          2
    Verstreken: 00:00:00.68
    MHO%xe> select * from
      2  (
      3  with all_your_data_are_belong_to_us -- generate some data on the fly here
      4  as (
      5      select 1 Id,  'Xyz' empfirstname,  'Abc' emplastname, 'Software Eng' empdesig from dual uni
    on all
      6      select 2, 'Xyz', 'Abc', 'Software Eng' from dual union all
      7      select 3, 'aaa', 'AAA', 'Fairy' from dual union all
      8      select 4, 'AAA', 'aaa', 'Fairy' from dual union all
      9      select 5, 'Zlad', 'Molvania', 'Electrician' from dual union all
    10      select 6, 'Kkk', 'Ddd', 'Architect' from dual
    11     )
    12  select id
    13  ,      empfirstname
    14  ,      emplastname
    15  ,      empdesig
    16  ,      count(*) over ( partition by empfirstname, emplastname, empdesig
    17                         order by 'geronimo' ) rn
    18  from   all_your_data_are_belong_to_us  --<< this could be YOUR table name, if so, omit the with-clause! ;-)
    19  )
    20  where rn > 1;
            ID EMPF EMPLASTN EMPDESIG             RN
             1 Xyz  Abc      Software Eng          2
             2 Xyz  Abc      Software Eng          2( As you can see, I used Karthick's example, and it worked after translating the 'French' part (partitoin vs. partition) ;-) )

  • How to choose in Delete Duplicates from internal table?

    Now I need to delete Duplicates from internal table,
    So at first I sort
    than I delete duplicate
    Sort itab1 BY Company_Code  Asset_No Capital_Date.
          DELETE ADJACENT DUPLICATES FROM itab1 COMPARING Company_Code  Asset_No  Capital_Date
    Company_Code
    Asset_No
    Capital_Date
    Remark
    BC35
    1515593
    20021225
    Helen
    BC35
    1515593
    20021225
    Common Asset
    BC35
    1515594
    20030109
    Judy
    BC35
    1515594
    20030109
    Common Asset
    But here comes my problem~If I want to delete the Common Asset in Remark Column,how I let it choose the right one to do it?

    Hi Jack
    Try the below coding..
    Report zsamp.
    types: begin of t_tab,
            comp_code(4) type c,
            ***_no(7) type n,
            cap_date type d,
            remark type string,
            end of t_tab.
    data: i_tab type TABLE OF t_tab,
           w_tab type t_tab.
    w_tab-comp_code = 'BC35'.
    w_tab-***_no = '1515593'.
    w_tab-cap_date = '20021225'.
    w_tab-remark = 'Helen'.
    append w_tab to i_tab.
    w_tab-comp_code = 'BC35'.
    w_tab-***_no = '1515593'.
    w_tab-cap_date = '20021225'.
    w_tab-remark = 'Common Asset'.
    append w_tab to i_tab.
    w_tab-comp_code = 'BC35'.
    w_tab-***_no = '1515594'.
    w_tab-cap_date = '20030109'.
    w_tab-remark = 'Judy'.
    append w_tab to i_tab.
    w_tab-comp_code = 'BC35'.
    w_tab-***_no = '1515594'.
    w_tab-cap_date = '20030109'.
    w_tab-remark = 'Common Asset'.
    append w_tab to i_tab.
    sort i_tab by remark.
    delete ADJACENT DUPLICATES FROM i_tab COMPARING remark.

  • Maximum number of allowed pages in Pivot Table exceeded

    Hi,
    I am working on Oracle Business Intelligence 10.1.3.2.1 . We have a requirement to show one report in the Pivot layout.
    But it throws one error: "Maximum number of allowed pages in Pivot Table exceeded (Configured Limit: 1000) "
    So I have modified the Instanceconfig.xml with the following piece of code:
    <PivotView>
         <MaxVisibleColumns>9000</MaxVisibleColumns>     
         <MaxVisiblePages>90000</MaxVisiblePages>
         <MaxVisibleRows>9000000</MaxVisibleRows>
         <MaxVisibleSections>9000000</MaxVisibleSections>
         <ResultRowLimit>9000000</ResultRowLimit>
    </PivotView>
    <CubeMaxRecords>9000000</CubeMaxRecords>
    <CubeMaxPopulatedCells>9000000</CubeMaxPopulatedCells>
    The number of records is 30 398. In another report the amount is much higher than this number of records and bring it with no problem.
    Can anyone please look into this Issue.

    Hi
    Try checking the link
    http://obiee101.blogspot.com/2008/02/obiee-controling-pivot-view-behavior.html
    Hope this helps
    Regards
    Debo

  • Maximum number of allowed pages in Pivot Table exceeded Configured Limit:

    When trying to create Calculated Item on Pivot table Page section Item like Division dim the calculated item is 'All' -> sum * and Customer again the calculated item is 'All -> sum * . it performs the first calculation (for division) but in the next one it gives the error
    "Maximum number of allowed pages in Pivot Table exceeded (Configured Limit: 1000)."

    Try limiting the resultset or upgrade the [MaxVisiblePages]
    see: http://obiee101.blogspot.com/2008/02/obiee-controling-pivot-view-behavior.html
    regards
    John
    http://obiee101.blogspot.com

  • Maximum number of allowed pages in Pivot Table

    Hi All,
    We are in OBIEE 10g and I am facing following error in a dashboard -
    Maximum number of allowed pages in Pivot Table exceeded (Configured Limit: 1000).
    Error Details Error Codes: UN2FNAHV 
    My instanceconfig.xml has following details -
    WebConfig>
    <ServerInstance>
       <DSN>AnalyticsWeb</DSN>
       <CatalogPath>E:/OBIEE/OracleBIData/web/catalog/PlngAnalytics</CatalogPath>
       <PivotView>
        <MaxCells>20000</MaxCells>
        <maxvisiblecolumns>20000</maxvisiblecolumns>
        <maxvisiblepages>10000</maxvisiblepages>
        <maxvisiblerows>50000</maxvisiblerows>
        <maxvisiblesections>10000</maxvisiblesections>
       </PivotView>
        <CubeMaxRecords> 10000000 </CubeMaxRecords>
        <CubeMaxPopulatedCells> 10000000 </CubeMaxPopulatedCells>
       <Alerts>
          <ScheduleServer>APPC-tst</ScheduleServer>
       </Alerts>
    Where is this limit set? Appreciate help on this please.

    Try limiting the result set or upgrade the [MaxVisiblePages]
    Check John's blog:-
    http://obiee101.blogspot.com/2008/02/obiee-controling-pivot-view-behavior.html
    Restart the services once it is done.
    Mark if helps,
    Thanks,

  • How to update duplicate row from table

    Hi,
    how to update duplicate row from table?
    First to find duplicate row then update duplicate row with no to that duplicate row in oracle.
    can you give me suggestion on it?
    Thanks in advance.
    your early response is appreciated...

    In order to find a duplicate row, see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1224636375004
    (or search this forum, your question has been asked before)
    In order to update it, just create and use an Oracle sequence, have it start and increment at a value that doesn't exist in your table.
    If that doesn't get you going, post some CREATE TABLE + INSERT INTO statements, and the results you want from them, in other words: a complete testcase.

  • Deletion of duplicates in the table with out using rowid

    How can I delete duplicates in the table with out using ROWID .

    hi
    sleect count(coulmnname),columnname from table
    group by columnname
    having count(columnname) > 1;
    find the primary key of the table
    apply the below query
    delete from table
    where (primary key,repeated column name )
    not in
    ( select min(primary key), repeated column
    from employee group by repeated column );
    use this in the primary key column use empid ,,,the repated column is ename
    empid ename
    1 sankar
    2 sankar
    try this one

Maybe you are looking for

  • Text measurement in Fireworks CS3

    Hi all, I'm designing a phone app, and a styleguide for the design, which require all the elements to be pixel perfect and add up to the screen dimension. There are 2 problems I run into is how to measure text in Fireworks CS3: 1) Fireworks CS3 measu

  • Stop Motion Video!

    I am trying to make a stop motion video in iMovie. Does anyone know how to turn off the Kens Burns Effect? -Zoe

  • ME21N Fast Change-Field Addiition

    Dear All, In ME21N/ME22N, there is a Fast Change Icon  at the item level after Copy Item Icon. When clicked on it, we can see the hidden fields in it which are present in the structure MEGUI_MASSCH_ALLOWED_FIELDS Now I want to add one more field whic

  • Need Help to Restore Facetime in my macbook

    Preferences & turn on are dimmed since I upgrade to OS X 10.8.2 can somebody Help my

  • SAP Basis Academy Certification

    Hi guys, i was wondering how often the exams change for the Basis Academy? I attended the academy classes TADM10, TADM12, TADM51 & TADM56, i would like to write my exams by February 2007 and the materials i have are for Q4 2005. Will i still be able