To avoid duplicate rows in oracle 8i

Can you suggest how to prevent duplicate rows while in situations where multiple refreshes from a single export file using Oracle 8.1.7?
Do i need to specify Commit=Y, Constraints= N and IGNORE=N while importing data?
Your suggestion would be appreciated.
Thanks in advance.

PK or not pk, if you set ignore=n, the import will be abort in case of table already exists, so you won't have any duplicate rows.
SQL> create table mytable as select * from all_users union all select * from all_users;
Table created.
SQL> select count(*) from mytable;
  COUNT(*)
        14
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> exp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp
Export: Release 9.2.0.4.0 - Production on Tue Nov 14 13:32:40 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export done in UTF8 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table                        MYTABLE         14 rows exported
Export terminated successfully without warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> sqlplus P97RPPRD/P97RPPRD                                     
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Nov 14 13:32:48 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> drop table mytable;
Table dropped.
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> imp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp
Import: Release 9.2.0.4.0 - Production on Tue Nov 14 13:33:07 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing P97RPPRD's objects into P97RPPRD
. . importing table                      "MYTABLE"         14 rows imported
Import terminated successfully without warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> imp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp
Import: Release 9.2.0.4.0 - Production on Tue Nov 14 13:33:46 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing P97RPPRD's objects into P97RPPRD
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "MYTABLE" ("USERNAME" VARCHAR2(30), "USER_ID" NUMBER, "CREATED"
"" DATE)  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 6553"
"6 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 505 PCTINCREASE 0 FREELISTS 1 FREELI"
"ST GROUPS 1 BUFFER_POOL DEFAULT)                        LOGGING NOCOMPRESS"
Import terminated successfully with warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> sqlplus P97RPPRD/P97RPPRD                                     
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Nov 14 13:34:13 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> select count(*) from mytable;
  COUNT(*)
        14
SQL>Now, if you haven't pk and set ignore=y, you will have duplicate lines, for sure :
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> imp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp ignore=y
Import: Release 9.2.0.4.0 - Production on Tue Nov 14 13:37:33 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing P97RPPRD's objects into P97RPPRD
. . importing table                      "MYTABLE"         14 rows imported
Import terminated successfully without warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> sqlplus P97RPPRD/P97RPPRD                                              
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Nov 14 13:37:57 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> select count(*) from mytable;
  COUNT(*)
        28
SQL> Now, test with pk and ignore=y, import doesn't insert the duplicate key, so you won't have any duplicate rows :
SQL> drop table mytable;
Table dropped.
SQL> create table mytable as select * from all_users;
Table created.
SQL> alter table mytable add (primary key (username));
Table altered.
SQL> insert into mytable select * from all_users;
insert into mytable select * from all_users
ERROR at line 1:
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> exp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp        
Export: Release 9.2.0.4.0 - Production on Tue Nov 14 13:41:39 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export done in UTF8 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table                        MYTABLE          7 rows exported
Export terminated successfully without warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> imp P97RPPRD/P97RPPRD tables=mytable log=test.log file=test.dmp ignore=y
Import: Release 9.2.0.4.0 - Production on Tue Nov 14 13:41:49 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing P97RPPRD's objects into P97RPPRD
. . importing table                      "MYTABLE"
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 SYS
Column 2 0
Column 3 14-NOV-2005:16:14:52
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 SYSTEM
Column 2 5
Column 3 14-NOV-2005:16:14:52
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 OUTLN
Column 2 11
Column 3 14-NOV-2005:16:15:05
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 DBSNMP
Column 2 19
Column 3 14-NOV-2005:16:24:23
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 PS
Column 2 21
Column 3 14-NOV-2005:16:36:41
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 P97RPPRD
Column 2 24
Column 3 14-NOV-2005:16:53:41
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (P97RPPRD.SYS_C001422815) violated
Column 1 PEOPLE
Column 2 25
Column 3 14-NOV-2005:16:57:09          0 rows imported
Import terminated successfully with warnings.
[data/ora/adm/DBA_ORACLE i05c09 : oracle : P97RPPRD ]> HTH,
Nicolas.

Similar Messages

  • #MULTIVALUE even affter checking avoid duplicate row agg.

    Hi experts
    I am getting multivalue error in few rows even after checking the option of avoid duplicate row  agg.
    any ideas
    regards

    Hi,
    #Multivalue :- this error will occur in 3ways
    1) #multivalue in aggregation -
      the o/p context not include i/p context its  situation this error occurs.
    2) #multivalue in breaks header or footer
    3) #multivalue in section level.
    Please provide us with the description of the issue u r facing.
    Regards,
    Chitha.

  • How to delete duplicate rows in oracle and retaining last duplicate rows

    Hi,
    I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
    I just want to delete duplicate rows but also want to retain the last duplicate row.
    For eg if one record is found three times ,i want to delete first and second record and retain
    the third one i.e the last inserted one.
    Regards
    Paramdeep Singh

    user13310594 wrote:
    Hi,
    I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
    I just want to delete duplicate rows but also want to retain the last duplicate row.
    For eg if one record is found three times ,i want to delete first and second record and retain
    the third one i.e the last inserted one.Hi Paramdeep,
    To start with, since you do not wish to keep multiple rows with same values, why allow them to get inserted in the first place?
    Wouldn't it be easier to block duplicate rows from inserting by creating a Unique constraint on Column(s) that define a row as duplicate, then rather deleting duplicate rows periodically?
    For deleting duplicate rows, there are N number of techniques available. Always remember, you need to have a rigid criteria that marks row as duplicate.
    [url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:15258974323143]this is one recomended by tom for large tables.
    Vivek L

  • Lookup transformation to avoid duplicate rows? - SSIS 2005

    Hi,
    I'm maintaning a SSIS 2005 pkg. I need to read a flat file to write on a SQL Server table, avoiding duplicates.
    I can have duplicates rows into the flat file to import and I need to prevent the insert of any rows already existing in the SQL Server table.
    So, I think to use a lookup transformation. I've created a flat file source, then I connect it to a lookup transformation and inside it I've specified as the reference table the SQL Server destination table. Then, I've checked the available lookup columns
    each adding as a new column: but the lookup task has arised an error and so I've specified as lookup operation the replacement. For each unmatching I need to write on the SQL Server table (the reference table in the lookup). For the lookup output error I've
    indicate to ignore failure. Other steps?
    However, when I run the pkg then inside the SQL Server destination table I can see only NULL values, but I want to see the rows don't already present in the table.
    Any suggests to me, please? Thanks

    Hi,
    I'm using SSIS 2005 as reported in the title of the post.
    I could have duplicates inside the source file and the existing table could haven't any rows.
    Thanks
    If you dont have any rows in existing table, then they will go through Error output in lookup task. For duplicates, lookup task will find matches and will go through lookup match output
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Duplicate Rows In Oracle Pipelined Table Functions

    Hi fellow oracle users,
    I am trying to create an Oracle piplined table function that contains duplicate records. Whenever I try to pipe the same record twice, the duplicate record does not show up in the resulting pipelined table.
    Here's a sample piece of SQL:
    /* Type declarations */
    TYPE MY_RECORD IS RECORD(
    MY_NUM INTEGER
    TYPE MY_TABLE IS TABLE OF MY_RECORD;
    /* Pipelined function declaration */
    FUNCTION MY_FUNCTION RETURN MY_TABLE PIPELINED IS
    V_RECORD MY_RECORD;
    BEGIN
    -- insert first record
    V_RECORD.MY_NUM = 1;
    PIPE ROW (V_RECORD);
    -- insert second duplicate record
    V_RECORD.MY_NUM = 1;
    PIPE ROW (V_RECORD);
    -- return piplined table
    RETURN;
    END;
    /* Statement to query pipelined function */
    SELECT * FROM TABLE( MY_FUNCTION ); -- for some reason this only returns one record instead of two
    I am trying to get the duplicate row to show up in the select statement. Any help would be greatly appreciated.

    Can you provide actual output from an SQL*Plus prompt trying this? I don't see the same behavior
    SQL> SELECT * FROM V$VERSION;
    BANNER
    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
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> CREATE TYPE MY_RECORD IS OBJECT(MY_NUM INTEGER);
      2  /
    Type created.
    SQL> CREATE TYPE MY_TABLE IS TABLE OF MY_RECORD;
      2  /
    Type created.
    SQL> CREATE OR REPLACE FUNCTION MY_FUNCTION
      2  RETURN MY_TABLE
      3  PIPELINED
      4          AS
      5                  V_RECORD        MY_RECORD;
      6          BEGIN
      7                  V_RECORD.MY_NUM := 1;
      8                  PIPE ROW(V_RECORD);
      9
    10                  V_RECORD.MY_NUM := 1;
    11                  PIPE ROW(V_RECORD);
    12
    13                  RETURN;
    14          END;
    15  /
    Function created.
    SQL> SELECT * FROM TABLE(MY_FUNCTION);
                  MY_NUM
                       1
                       1

  • Duplicate rows in Oracle

    What would cause Oracle to insert duplicate rows into a table? Could a join of two tables in the initial query assigned to an application page cause ORacle to insert an extra row into a table when an update to data value occurs? I have no insert triggers and no foreign keys assigned to the table. I am not sure what would cause Oracle to assume that an insert of a row must occur. I want to prevent that insert.

    V Rickert wrote:
    What would cause Oracle to insert duplicate rows into a table? Could a join of two tables in the initial query assigned to an application page cause ORacle to insert an extra row into a table when an update to data value occurs? I have no insert triggers and no foreign keys assigned to the table. I am not sure what would cause Oracle to assume that an insert of a row must occur. I want to prevent that insert.Is there an APEX dimension to this? If so, tell us the full APEX and DB versions, and provide full details of what the APEX app is doing (a debug trace of page accept processing is the obvious place to start).
    The most likely explanations are:
    1. There is no duplicate in the table but there is a join problem in the query reporting on it, resulting in the appearance of a duplicate in the reults. Have you confirmed that the duplicate is really a physical row in the table?
    2. There is an APEX page/application process containing an insert on the table that is unexpectedly running on page accept due to it having no condition or an incorrect condition. This will be visible in the Debug trace.

  • How to avoid Duplicate values in Oracle forms

    Hello Everyone,
    I am new to Oracle forms, working on Oracle Applications : 12.1.2,
    Here I have a form Receiving Transactions,
    in that I have Lot_Number and quantity columns.
    The purchased items need to be stored in Lot number.
    If 100 quantities purchased then 100 quantities can be stored in single lot number
    i.e
    Lot_Number         Qty
      001                100or 100 quantities can be stored in different lot numbers.
    i.e
    Lot_Number         Qty
      001                50
      002                50(The qty may differ)but not like the following,
    Lot_Number          Qty
      001                 50
      001                 50.For second line,If they selected same lot number as First lot number,
    The error message has to be shown as "Lot number duplicated,Select Different Lot number or update the full qty in original line".
    Can anyone help me to solve this.
    Thank you.
    Regards,
    Gurujothi

    Hi François Degrelle,
    I added the following Plsql in the 'When-validate-Item' block,
    declare
    l_current_number varchar2(80);
    begin     
    l_current_number := :lot_entry.lot_number;
    first_record;
    loop
      if l_current_number = :lot_entry.lot_number then
         message ('Duplicate');
      end if;
      next_record;
    end loop;Its started to check from First record itself and giving the message 'Duplicate',
    How to check from second record?
    when the first record is entered it should not check when the second record is entered it should compare with the First record value and if it is same then it should give message as 'Duplicate'.
    Thank you.

  • Getting the ROWIDs of non-duplicate rows in Oracle 10g

    Hi,
    given a table TAB1 in which the primary key is composed of these first 3 columns:
    ================================================
    colA____________colB_________________colC____________________colD
    ================================================
    AA-----------------------01-----------------------20080101-----------------------100
    BX-----------------------32-----------------------20050325-----------------------366
    AA-----------------------01-----------------------20080102-----------------------645
    AA-----------------------01-----------------------20080707-----------------------765
    AB-----------------------02-----------------------20080806-----------------------336
    AB-----------------------02-----------------------20080705-----------------------543
    I wish to be able to find the ROWIDs of those rows where colA||colB occurs only once in the table TAB1.
    So in the above example, I would want to know the ROWID of the row containing colA=BX and colB=32 as "BX32" occurs only once in this table (AA01 occurs 3 times, AB02 occurs twice so I'm not interested in them).
    The following does work, but it is too SLOW:
    select ROWID from TAB1 where colA||colB = (select colA||colB from TAB1 HAVING COUNT(*)=1)
    Can anyone please suggest an efficient way to find this unique ROWID value in these circumstances?
    Edited by: Nemesis on Nov 29, 2008 2:50 AM

    Thank you Walter.
    This does not give the desired result however. It compares the table, row by row with a 'mirror' of itself and says 'give me the rowid of the row where its mirror does not match itself' (correct me if I am wrong)
    (Here I added the '=' to ' AND d.ROWID = d1.ROWID);'
    SELECT D.rowid
    FROM TAB1 D
    WHERE NOT EXISTS (SELECT *
    FROM TAB1 d1
    WHERE d1.COLA = d.COLA
    AND d1.COLB = d.COLB
    AND d.ROWID = d1.ROWID);
    So it returns nothing as all rows match their mirror rows.
    However, it gave me the idea of doing the following:
    SELECT D.ROWID FROM TAB1 D WHERE (SELECT COUNT(*) FROM TAB1 D1 WHERE X.colA = D.colA AND X.colB = D.colB )=1;
    Which works, and seems a little faster than my original query, so thank you for this.

  • Crystal report duplicate row problem

    Hi expert,
    Need help about crystal report for my customer, want to make report about outgoing payment(OVPM) but it become duplicate row for detail because 1 payment include lot cheque(VPM1) more than 1,i just want to know if there got other method to avoid duplicate row.I also try put formula for detail area "{VPM1.CheckAct} = Next({VPM1.CheckAct})" or "{VPM1.CheckAct} = previous({VPM1.CheckAct})"..it useful for 1 row only,if i put more row,it will eliminate other row,just show 1 row.
    Here is my query take from crystal report.
    SELECT 
    "OVPM"."DocTotal", "OVPM"."DocNum", "OVPM"."DocDate",
    "NNM1"."SeriesName", "OVPM"."Address", "OVPM"."DocCurr", "VPM1"."CheckNum",
    "VPM4"."AcctCode", "OVPM"."CheckAcct", "OACT_1"."AcctName", "OACT_2"."AcctName",
      "VPM4"."Descrip", "OVPM"."Comments", "OVPM"."NoDocSum", "OVPM"."DocType", "VPM2"."DocEntry",
       "VPM2"."SumApplied", "OPCH"."DocDate", "VPM2"."InvType", "OCRD"."Phone1", "OCRD"."Fax",
        "OCRD"."CntctPrsn", "VPM2"."DocNum", "VPM1"."BankCode", "OVPM"."CardName", "OVPM"."CardCode",
         "VPM1"."CheckAct", "OACT_3"."AcctName", "VPM1"."CheckSum", "VPM1"."LineID", "VPM4"."OcrCode",
          "OVPM"."CounterRef", "OVPM"."TrsfrAcct", "OACT_4"."AcctName", "OVPM"."TrsfrSum",
           "OVPM"."PayToCode", "OVPM"."JrnlMemo", "VPM4"."SumApplied", "OVPM"."CashAcct", "VPM1"."U_Ref"
    FROM  
    "OVPM" "OVPM"
    LEFT OUTER JOIN "VPM2" "VPM2" ON "OVPM"."DocNum"="VPM2"."DocNum"
    LEFT OUTER JOIN "NNM1" "NNM1" ON "OVPM"."Series"="NNM1"."Series"
    LEFT outer JOIN "VPM1" "VPM1" ON "OVPM"."Docentry"="VPM1"."DocNum"
    LEFT OUTER JOIN "VPM4" "VPM4" ON "OVPM"."DocNum"="VPM4"."DocNum"
    LEFT OUTER JOIN "OACT" "OACT_2" ON "OVPM"."CheckAcct"="OACT_2"."AcctCode"
    LEFT OUTER JOIN "OCRD" "OCRD" ON "OVPM"."CardCode"="OCRD"."CardCode"
    LEFT OUTER JOIN "OACT" "OACT_4" ON "OVPM"."TrsfrAcct"="OACT_4"."AcctCode"
    LEFT OUTER JOIN "OACT" "OACT_3" ON "VPM1"."CheckAct"="OACT_3"."AcctCode"
    LEFT OUTER JOIN "OACT" "OACT_1" ON "VPM4"."AcctCode"="OACT_1"."AcctCode"
    LEFT OUTER JOIN "OPCH" "OPCH" ON "VPM2"."DocEntry"="OPCH"."DocEntry"
    WHERE  "OVPM"."DocNum"=9005070
    ORDER BY "OVPM"."DocNum", "VPM1"."LineID"

    Hi,
    Change LEFT outer JOIN "VPM1" "VPM1" ON "OVPM"."Docentry"="VPM1"."DocNum"
    to: LEFT JOIN "VPM1" "VPM1" ON "OVPM"."DoceNum"="VPM1"."DocNum"
    Remove: LEFT OUTER JOIN "OACT" "OACT_3" ON "VPM1"."CheckAct"="OACT_3"."AcctCode"
    Thanks,
    Gordon

  • 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.

  • Avoid duplicates in datagrid

    There are 2 dataGrids: G1 and G2. Rows can be dragged and
    dropped from G1 into G2. There can be duplicate rows in G1, but we
    need to avoid duplicate rows in G2.
    Ideally there should be a STOP sign displayed when there is
    an attempt to drop a duplicate row into G2.
    How can this be done?
    Thanks.

    in your drag drop handler, get the dragged row(s), use the
    getItemIndex() method of the underlying dataProvider array
    collection to see if this row is already there, if so, just call
    the event.preventDefault() and set the feedback to stop.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1318924&highlight_key=y&keyword1=preventdefault
    ATTA

  • Duplicate rows in Webi Report

    Anyone can pls tell me how to avoid duplicate rows in a webi report. I have tried checking the 'Avoid duplicate row agg.' option as well as 'Retrieve duplicate rows'.
    The query that is generated in the webi gives proper results wehn run at the database level but not in the report.
    What can be the problem?

    Hi VickyBobj,
    It's hard to know, but my guess is the way the objects are defined in the universe. Make sure your measures are defined correctly, as sum, count, etc. and also make sure you have placed dimensions and measures correctiy within the report format - meaning generally dimensions in the headers and measures in the body.
    Thanks

  • Deleting duplicate rows based on three columns in Oracle 8i

    Hi all,
    The database we use is Oracle 8i.
    The query below raises the too_many_rows exception when I launch an application. So I want to delete the duplicated rows :
    select polarisation_1, polarisation_2
    into v_pol1_tech, v_pol2_tech
    from v_cfh_lien_element
    where nom_lien = p_nom_lien
    AND num_canal_1 = p_num_canal_1
    AND freq_emise_1 = p_freq_emise_1;
    Notice that with many possible values of the parameters p_nom_lien, p_num_canal_1 and p_freq_emise_1 then the exception is raised.
    So how to delete generally the duplicated rows based on the three columns "nom_lien" , "num_canal_1" and "freq_emise_1" ?
    Thank you very much indeed.

    Check the other thread with same question deleting duplicate rows based on three columns in Oracle 8i

  • To avoid duplicate entries in multi row

    Hi i need to avoid duplicate entries in multi record form.In the master block i have AGENCY CODE.These are the fields, RATING_CODE(composite primary key alng with AGENCY_CODE in the detail block,but set as hidden) and DESCRIPTION
    in the detail block.If AGENCY_CODE is CRISIL,then for that i should not enter duplicate RATING CODES.I have written
    DECLARE
         L_COUNT2 NUMBER;
         l_ret varchar2(20);
    BEGIN
         SELECT COUNT(*) INTO L_COUNT2 FROM CSTM_AGENCY_CODE_DETAIL
    WHERE AGENCY_CODE=:BLK_CSTM_AGENCY_CODE_DETAIL.AGENCY_CODE
    AND RATING_CODE=:BLK_CSTM_AGENCY_CODE_DETAIL.RATING_CODE;
    IF L_COUNT2 > 0 THEN
              l_ret := ovpkcs.fn_dispmsg('AGYCOD-03;',';',';');
    Raise Form_Trigger_Failure;
    END IF;
    END;
    in WHEN_VALIDATE_ITEM.
    Now when i press the TAB to move next time it gives the message,DUPLICATE RATING CODE.The
    problem is when i move back to the previous record by clicking mouse and change it to the already existing value,and while i save the validation is not happening and the message is not shown.Kindly tell me where i should code.
    Thank you

    hy,
    you can check whan commit( an save button)
    for i = 1 to n-1
    check condition (item = item +1)
    next_record
    end
    or by stored insert whit exception return to form program when duplicate key is found
    ...

  • How to get the duplicate(exist) rows in Oracle?

    Good morning,
    I want to write the query to find the duplicate rows in the table.
    SELECT ITEM, MFT_ITEM, MFT, DESC FROM ITEM
    In the item table,if MFT_ITEM is coming more than or equal to twice ,it is a duplicate rows.MFT_ITEM is a unique.
    ITEM    MFT_ITEM   MFT              DESC
    4647 4648 C6253 TOOLS
    4647 4648 A0237 TOOLS
    10PS 10PS A0027 KITS
    10PS 11PS A0028 COVER
    12LN 12LN A0034 NUTS
    12LN 12LN A0035 NUTS
    12LN 13LN A0036 SCREW
    4310 4311 00462 POWER
    4310 4311 31645 POWER
    4310 4311 81205 POWER
    I want the results like
    ITEM    MFT_ITEM   MFT              DESC
    4647 4648 C6253 TOOLS
    4647 4648 A0237 TOOLS
    12LN 12LN A0034 NUTS
    12LN 12LN A0035 NUTS
    4310 4311 00462 POWER
    4310 4311 31645 POWER
    4310 4311 81205 POWER
    Please reply

    Nicole Thanks for your advise,
    I try the below query , I am getting 0 rows.
    With t As
    Select 4647 ITEM,4648 MFG_ITEM, 'C6253' MFG ,'Tools' Descrip From dual Union All
    Select 4647 ,4648 , 'A0237' ,'Tools' From dual Union All
    Select 1088 ,1088 , 'A0027' ,'Kits' From dual Union All
    Select 1088 ,1188 , 'A0028' ,'Covers' From dual Union All
    Select 1245 ,1245 , 'A0034' ,'Nuts' From dual Union All
    Select 1245 ,1245 , 'A0035' ,'Nuts' From dual Union All
    Select 1245 ,1345 , 'A0036' ,'Screw' From dual Union All
    Select 4310 ,4313 , 'A0046' ,'Power' From dual Union All
    Select 4310 ,4313 , 'A3164' ,'Power' From dual Union All
    Select 4310 ,4313 , 'A0462' ,'Power' From dual
    )Select ITEM, MFG_ITEM,MFG,DESCRIP From
    Select ITEM, MFG_ITEM,MFG,DESCRIP,
    Count(MFG_ITEM) over (Partition By ITEM Order By ITEM) cnt
    From t
    ) Where cnt > 1;
    I should get the results like below
    ITEM     MFG_ITEM     MFG     DESCRIP
    4647     4648     C6253     Tools
    4647     4648     A0237     Tools
    1245     1245     A0034     Nuts
    1245     1245     A0035     Nuts
    4310     4313     A0046     Power
    4310     4313     A3164     Power
    4310     4313     A0462     Power
    Please reply

Maybe you are looking for

  • Event Reminder crashes at start up

    Hello, Each time I start up I have my event reminder that crashes, it opens (nothing is written inside the window) and then the cursor spins the color ball continuously while on this window) it drains a lot of RAM so I have to force quit it by using

  • Aperture & iPhoto - Solution to Livein both worlds?

    I am new to Aperture. Knowing I have to use a plug-in that only has iPhoto version (book printing from hypo.cc - A Taiwan-based 1-click book printing vendor), I will have to assume that I have to jump back and forth between the two. Googling around a

  • K7T Turbo2 ver5.0 won\'t reboot

    I just recently bought a K7T Turbo2 (MS-6330) motherboard and I'm having a problem with it rebooting.  I can't get the board to do a warm reboot.  It works fine if I turn off the power and then turn it back on but even changing the BIOS settings won'

  • Convert Files to PDF (Support Batch Mode)

    In order to save time on converting files to PDF, the function, batch conversion is developed by converter developers. Spire Free PDF Converter is one good choice to batch convert files (including Word, Excel, HTML, Text and All Image Formats) to PDF

  • Computer goes to Sleep, but doesn't wakeup

    Hello, I just completed a build per below, and mostly issues have been resolved.   two nagging issue remains:   my computer goes into "sleep" mode overnight and it doesn't wakeup in the morning; I have to cut power and restart.    If I test immediate