Duplicate entries in mms_rbs_subscription table
We use a mobile iOS Application which is connected a SUP 2.1 Server. The Application runs fine until a couple of weeks but now we got some synchronisation problems. Some users don't get data changes on their devices.
Probably we have identified one possible reason for these synchronisation problem.
In the CDB we have duplicate entries in the mm_rbs_subscription table. Duplicate means, that for one device_id there are two or three remote_ids in this table. We dont know the reason, but we assume that these entries were created during our iOS7 Migration.
Maybe this entries are one of the reasons for our current synchronisation problems.
Did anybody know, how which entries would be created? And is it possible to delete entries in the mms_subscription table?
Hi Shiv,
thanks for your answer. In our Application every MBO is collected in a cachegroup. We have 5 cachegroups, including the default cache group, every cache group contains round about 1 to 5 MBOs.
What do you mean with "Partition" option. The cache group policy is configured to scheduled, so i can't set a partition option here.. Is there any other possibility to set a "partition" option?
Best regards,
Ingo
Similar Messages
-
Short dumop in J2I5 (provide duplicate entry in Standard table)
Hello Expert ,
We have a problem in T.Code J2I5 ( Excise Register Extraction) input entry is lelect Excise group 20 . and a date from 04.08.09 onwards. and select the register RG23D . it shows the run time error ( Eg The ABAP/4 Open SQL array insert results in duplicate database record ) . but in the standard Tcode is there possible to provide duplicate entry in Standard table
Thaks & regards
Aditya Kr TripathiRuntime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
Date and Time 29.01.2010 10:57:09
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
problem occurs in this code :
assign I_RG23D_TAB-I_RG23D_TYP to <x_rg23dtyp> casting.
<x_extrctdata> = <x_rg23dtyp>.
class CL_ABAP_CONTAINER_UTILITIES definition load.
call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = i_rg23d_tab-i_rg23d_typ
IMPORTING
EX_CONTAINER = i_report_tab-extrctdata
EXCEPTIONS
ILLEGAL_PARAMETER_TYPE = 1
others = 2.
I_REPORT_TAB-EXTRCTDATA = I_RG23D_TAB-I_RG23D_TYP.
COMPUTE I_REPORT_TAB-EXTRCTLNGT = STRLEN( I_REPORT_TAB-EXTRCTDATA ).
APPEND I_REPORT_TAB.
ENDLOOP.
IF M_EXTRACTED = 'X'.
LOOP AT I_RG23D_KEY.
DELETE
FROM J_2IEXTRCT
WHERE BUDAT = I_RG23D_KEY-BUDAT
AND SERIALNO = I_RG23D_KEY-SERIALNO
AND REGISTER = I_RG23D_KEY-REGISTER
AND EXGRP = I_RG23D_KEY-EXGRP.
ENDLOOP.
ENDIF.
Control table check here for data Extraction
INSERT J_2IEXTRCT FROM TABLE I_REPORT_TAB.
If the insertion of the extract table is successfull then the table
for Extraction is Inserted
IF SY-SUBRC EQ 0.
PERFORM FILL_EXTDT USING C_RG23D M_EXTRACTED.
ENDIF.
ENDFORM. " RG23D
*& Form RG23CPART1
Purpose : RG23C Part I extraction logic
FORM RG23CPART1.
DATA: $PART1 TYPE PART1_TYP,
$LINCNT LIKE SY-LINCT,
M_EXTRACTED VALUE '',
$RC LIKE SY-SUBRC.
*********************************************************************************************8 -
How to check duplicate entries in internal table??
Dear Friends,
How to check duplicate entries in internal table??
Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
Thanks,
SridharHi,
After storing the data into internal table say ITAb, move the data into another internal table.
t_dup[] = itab[].
LOOP AT itab.
count1 = count1 + 1.
itab-count1 = count1.
MODIFY itab.
ENDLOOP.
LOOP AT t_dup.
count2 = count2 + 1.
t_dup-count2 = count2.
MODIFY t_dup.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM itab.
LOOP AT t_dup.
record_dup = 'N'.
READ TABLE itab WITH KEY count1 = t_dup-count2.
IF sy-subrc = 0.
record_dup = 'Y'.
ENDIF.
IF record_dup NE 'Y'.
t_dup-message = 'DUPLICATE ENTRY'.
t_dup-flag = 1.
MODIFY t_dup.
ENDIF.
ENDLOOP.
Use this sample code.
Reward pts if it is helpfull.
Regards
Srimanta -
Middleware Settings - Duplicate entries in the Table TCURC
Hi Experts,
I am doing middleware settings for integrating SAP CRM 5.0 with SAP R/3 4.7.
Before replicating the customizing objects, i found duplicate entries for ISO Codes in the table TCURC (Field name-ISOCD).
Following are those entries
MANDT WAERS ISOCD ALTWR GDATU XPRIMARY LTEXT KTEXT
949 CFP XPF 953 00.00.0000 French Franc (Pacific Islands) Fr. Frank (Pac)
949 CNY CNY 156 00.00.0000 X Chinese Renminbi Renminbi
949 DEM DEM 280 00.00.0000 X German Mark German Mark
949 DEM3 DEM 280 00.00.0000 (Internal) German Mark (3 dec.places) (Int.) DEM 3 DP
949 RMB CNY 156 00.00.0000 Chinese Yuan Renminbi Yuan Renminbi
949 USD USD 840 00.00.0000 X United States Dollar US Dollar
949 USDN USD 840 00.00.0000 (Internal) United States Dollar (5 Dec.) US Dollar
949 XPF XPF 953 00.00.0000 X CFP Franc Franc
Duplicate entries are in the third column.
Please kindly let me know what is the impact and what should i do now.
Points will be rewarded for the helpful answers.
Thanks in advance
Nadh.RHi Murali,
Thanks for your reply.
But i didnt find anything related to the issue in that note.
Do you have any other solution.
Thanks
Nadh. -
Hi everyone
I am a little confused by a situtation I have come across in one of our bespoke tables. I was under the impression that all fields in a table that are marked as Key form a Primary Key and therefore it is <b>impossible</b> to create records where these key fields contain duplciate data. However, I have found a bespoke table that is used for logging exception messages that appears to hold records with duplicates in the Key fields. Has anyone else come across this or have any idea how it might be happening? When creating a table is possible to specify a non-unique key in the same way you might for an internal table?! If it is relevant, the table is updated from a program that locks and unlocks the table before and afer the insert takes place and can be caused by both batch and manual changes.
Thanks
AndyThanks Roopesh
I understood the [ACCEPTING DUPLICATE KEYS] flag to mean that a a 'bulk' insert would not fail if a duplicate entry was identified but instead would set subrc to 4, skip the record in question and continue with subsequent records. If this is the case it still should not actually create duplciate entries - surely in doing so referential integrity is being violated...
Here is the section of code that performs the insert if that helps at all:
*lock table and insert processing log details
CALL FUNCTION 'ENQUEUE_EZLG_T024E'
EXPORTING
MODE_ZLG_T024 = 'E'
MANDT = SY-MANDT
EMPLOYER_REG_NO = zlg_t024-EMPLOYER_REG_NO
GRANT_CLAIM_NO = zlg_t024-GRANT_CLAIM_NO
ITEM = zlg_t024-ITEM
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
insert zlg_t024.
* unlock table.
CALL FUNCTION 'DEQUEUE_EZLG_T024E'
EXPORTING
MODE_ZLG_T024 = 'E'
MANDT = SY-MANDT
EMPLOYER_REG_NO = zlg_t024-EMPLOYER_REG_NO
GRANT_CLAIM_NO = zlg_t024-GRANT_CLAIM_NO
ITEM = zlg_t024-ITEM
Kind regards
Andy -
Duplicate Entry in Child Tables in AD Process Form on triggering multipleAP
hi all,
I have a scenarion in which I have to provision AD Group Membership, for addition of each role to User.
so I have created 5 Access policies, 5 roles and mapped AD Group in each access policy.
The roles are comming from trusted source seperated by a string tokenizer.
I have java code which will trigger and assign the role memberhsip to user, one after the other. iterating with the string tokenizer(;)
The problem I see is, I see multiple entries of AD Groups in the process form for each group.
If I add 3 roles to the user, I am seeing 6 entries in the AD Process form. Duplicate row for each and every row. sometimes i see 3 entries for each row. and 1 entry for each row.
If I add the role memberships manually, by searching, then I dont see any problem with the AD child form.
and also If I add a single group membership I dont see any problem with the AD Child form.
I suspect that the event handler tcEvaluateAccessPolicies which is there in the post update is trying to add the duplicate entries as still the AD Group membership which is triggered for the first time is not yet finished by evaluating the access policies again.
any such experiences? thoughts? work arounds?
my oim environment is OIM11.1.1.3.0 on weblogic server.I have always coded these checks into my custom code whenever i maninuplate child table data. When adding, i always check the existing and when deleting, i always check if the value exists that i'm removing. I would suggest you write a piece of code that does the same and keep it in your library of re-usable code.
You could try going to the database and making the field for the name a unique field. I don't know what the outcome will be from doing so.
-Kevin -
Need advice on preventing duplicate entries in People table
Hi,
In my database, I have a "People" table where I store basic information about people e.g. PersonId, FirstName, LastName, Gender, etc.
There will be lots of entries made into this table and I want to prevent duplicate entries as much as humanly possible. I'd appreciate some pointers on what I should do to minimize duplicates.
My primary concerns are:
Duplicate entries for the same person using the person's full name vs. given name e.g. Mike Smith and Michael Smith
Making sure that two separate individuals with identical names do get entered into the table and get their unique PersonId's.
Not even sure how I can even possibly know if two individuals with identical names are two different people without having additional information but I wanted to ask the question anyway.
Thanks, SamThank you all very much for your responses.
There are three separate issues/points here.
It is clear that it is impossible to prevent duplicates using only a person's first, middle and last names. Once I rely on an additional piece of information, then things get "easier" though nothing is bullet proof. I felt that this was self evident but
wanted to ask the question anyway.
Second issue is "potential" duplicates where there are some variations in the name e.g. Mike vs Michael. I'd like a bit more advice on this. I assume I need to create a table to define variations of a name to catch potential duplicates.
The third point is what Celko brought up -- rather nicely too :-) I understand both his and Erland's points on this as typical relational DB designs usually create people/user tables based upon their context e.g. Employees, Customers, etc.
I fundamentally disagree with this approach -- though it is currently the norm in most commercial DB designs. The reason for that is that it actually creates duplicates and my point is to prevent them. I'm going for more of an object based approach in the DB
design where a person is a person regardless of the different roles he/she may play and I see no reason in repeating some of the information about the person e.g. repeating first, last name, gender, etc in both customer and employee tables.
I strongly believe that all the information that are directly related to a person should be kept in the People table and referenced in different business contexts as necessary.
For example, I assign every person a PersonId in the People table. I then use the PersonId as part of the primary key in the Customers or Employees table as well. Obviously, PersonId is also a foreign key in Customers and Employees tables. This prevents the
need for a separate CustomerId and allows me to centralize all the personal data in the People table.
In my opinion this has three advantages:
Prevent duplication of data
Allow global edits e.g. if the last name of a female employee changes, it is automatically updated for her within the context of "Customer" role she may play in the application.
Last but not least, data enrichment where a person may enter additional data about himself/herself in different contexts. For example, in the employee context, we may have the person's spouse information through "Emergency Contacts" which may come handy
within the context of customer for this person.
Having everyone in the People table gives me these three advantages.
Thanks, Sam -
Finding Duplicate Entries in a table
I have a table with the following fields in Oracle 10g.
TABLE_1
account_no | tracking_id | trans_amount
Each account_no can have multiple tracking Id's.
How do i query out the duplicate entries of account_no where tracking lies between 1 and 1000 ?
Many thanks in advance for your help,
novice.Hi,
Whenever you have a question, it helps to post a little sample data, and the results you want from that data.
You may think you're explaining clearly, but it won't be nearly as clear to someone who isn't familiar with your tables, your data, and your requirements. Sanjay and I apparantly have different ideas about what you requested, and perhaps neither is what you really want. It would be much harder for us to make mistakes and give you bad advice if you posted the data and results.
Here's my guess:
WITH got_cnt AS
SELECT table_1.*
, COUNT (*) OVER (PARTITION BY account_no)
FROM table_1
WHERE tracking_id BETWEEN 1
AND 1000
SELECT account_no, tracking_id, trans_amount
FROM got_cnt
WHERE cnt > 1
;If there are two rows with the same account_no, and both rows have tracking_id in the given range, then both rows will be displayed. -
Duplicate Entries in Internal table
Hi All,
As per my requirement
1. The internal table is the input.
2. I need the duplicate records of the internal table with the combination of 2 key fields.
3. I should not use SORT because i need the index number in order as per in the table .
EX : Take Table MSEG.
Take key fields as MBLNR and WERKS.
I want the duplicate records of the combination of these 2 key fields.
The *Index Number * should not to be changed as per the table entry. ( So i avoided sorting the internal table)
Kindly give some solutions.
Thanks,
Pradeep.
Moderator message : Duplicate post locked,follow forum Rules of Engagement. Thread locked.
Edited by: Vinod Kumar on Mar 1, 2012 4:59 PMHi Pradeep,
Try this...
first you copy your internal table to another temporary table of same type.
itab_temp[] = itab[].
sort itab_temp[].
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MBLNR WERKS.
LOOP AT ITAB_TEMP INTO WA_ITAB1.
DO.
READ TABLE ITAB INTO WA_ITAB2 WITH KEY MBLNR = WA_ITAB1-MBLNR AND WERKS = WA_ITAB1-WERKS.
IF SY-SUBRC EQ 0.
APPEND WA_ITAB2 TO ITAB_NEW.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDLOOP.
you may get the duplicate records in itab_new. -
Duplicate Entries in Internal Tables
Hallo Friends,
It Would be nice if some one let me know, if there is a way in ABAP to select the duplicates records in an internal tables.
Lets say I have two internal tabels, itabA have following structure:
BNAME | WORKAREA | ROLES
abc | wa1 | ro1
cde | wa1 | ro1
cde | wa3 | rol..
abc | wa2 | rol2
xyz | wa1 | rol3
xyz | wa3 | rol2..
the itabB have the following structure:
WORKAREA | ROLES|
wa1 | rol1
wa2 | rol1
wa3 | rol1
wa4 | rol1
Now problem is, I need to select the common WorkAreas from itabA ( which is commom in all BNAME ) in above example it will be workarea wa1. as it is commom in all i.e ( abc ,cde and xyz). I need to select this commom workarea, and then mark it with some flage in itabB ( to display that this workarea is common among the users...)
Would be nice if some one let me know, is there any way I can select the duplicate rows in an internal table or I have to go one by one and then do some kind of comparision.
Many thanks,
Thx in advance....
HaiderHi marek,
below information might help you.
The first criterion for comparing internal tables is the number of lines they contain. The more lines an internal table contains, the larger it is. If two internal tables contain the same number of lines, they are compared line by line, component by component. If components of the table lines are themselves internal tables, they are compared recursively. If you are testing internal tables for anything other than equality, the comparison stops when it reaches the first pair of components that are unequal, and returns the corresponding result.
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA: ITAB LIKE TABLE OF LINE,
JTAB LIKE TABLE OF LINE.
DO 3 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
APPEND LINE TO ITAB.
ENDDO.
MOVE ITAB TO JTAB.
LINE-COL1 = 10. LINE-COL2 = 20.
APPEND LINE TO ITAB.
IF ITAB GT JTAB.
WRITE / 'ITAB GT JTAB'.
ENDIF.
APPEND LINE TO JTAB.
IF ITAB EQ JTAB.
WRITE / 'ITAB EQ JTAB'.
ENDIF.
LINE-COL1 = 30. LINE-COL2 = 80.
APPEND LINE TO ITAB.
IF JTAB LE ITAB.
WRITE / 'JTAB LE ITAB'.
ENDIF.
LINE-COL1 = 50. LINE-COL2 = 60.
APPEND LINE TO JTAB.
IF ITAB NE JTAB.
WRITE / 'ITAB NE JTAB'.
ENDIF.
IF ITAB LT JTAB.
WRITE / 'ITAB LT JTAB'.
ENDIF.
The output is:
ITAB GT JTAB
ITAB EQ JTAB
JTAB LE ITAB
ITAB NE JTAB
ITAB LT JTAB
This example creates two standard tables, ITAB and JTAB. ITAB is filled with 3 lines and copied to JTAB. Then, another line is appended to ITAB and the first logical expression tests whether ITAB is greater than JTAB. After appending the same line to JTAB, the second logical expression tests whether both tables are equal. Then, another line is appended to ITAB and the third logical expressions tests whether JTAB is less than or equal to ITAB. Next, another line is appended to JTAB. Its contents are unequal to the contents of the last line of ITAB. The next logical expressions test whether ITAB is not equal to JTAB. The first table field whose contents are different in ITAB and JTAB is COL1 in the last line of the table: 30 in ITAB and 50 in JTAB. Therefore, in the last logical expression, ITAB is less than JTAB.
reward with points and close the thread if your question is solved
regards,
venu. -
Duplicate entries in referenced table (SQLInline=false)
Hi,
I'm testing with the following example XSD from Oracle:
declare
doc varchar2(8000) := '
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.0" xdb:schemaURL="http://xmluser.de.oracle.com/xsd/deptemp.xsd">
<xsd:complexType name="Department" xdb:SQLType="DEPT_T">
<xsd:sequence>
<xsd:element name="Deptno" type="xsd:decimal" xdb:SQLName="DEPTNO"/>
<xsd:element name="Deptname" type="xsd:string" xdb:SQLName="DEPTNAME"/>
<xsd:element name="Employees" type="Employee" maxOccurs="unbounded" xdb:SQLName="EMPLOYEES" xdb:SQLInline="false" xdb:defaultTable="EMPLOYEES_TABLE"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Employee" xdb:SQLType="EMP_T">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string" xdb:SQLName="NAME"/>
<xsd:element name="Age" type="xsd:decimal" xdb:SQLName="AGE"/>
<xsd:element name="Addr" type="Address" xdb:SQLName="ADDRESS"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Address" xdb:SQLType="ADDR_T">
<xsd:sequence>
<xsd:element name="Street" type="xsd:string" xdb:SQLName="STREET"/>
<xsd:element name="City" type="xsd:string" xdb:SQLName="CITY"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="emptable" type="Employee" xdb:defaultTable="EMP_TAB"/>
<xsd:element name="depttable" type="Department" xdb:defaultTable="DEPT_TAB"/>
</xsd:schema>
begin
-- dbms_xmlschema.deleteSchema('http://xmluser.de.oracle.com/xsd/deptemp.xsd', dbms_xmlschema.DELETE_CASCADE_FORCE);
dbms_xmlschema.registerSchema('http://xmluser.de.oracle.com/xsd/deptemp.xsd', doc, TRUE, TRUE, FALSE, TRUE);
end;
Whenever I insert a line into the DEPT_TAB created by the above example, I get two entries for any contained Employees element in the EMPLOYEES_TABLE.
E.g. the EMPLOYEES_TABLE is empty:
SQL> select * from EMPLOYEES_TABLE;
No rows selected.
Then I insert the following:
SQL> insert into DEPT_TAB VALUES (sys.XMLType('
<depttable xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmluser.de.oracle.com/xsd/deptemp.xsd">
<Deptno>1</Deptno>
<Deptname>Sales Consulting</Deptname>
<Employees>
<Name>ABC</Name>
<Age>11</Age>
<Addr>
<Street>Street1</Street>
<City>City1</City>
</Addr>
</Employees>
<Employees>
<Name>DEF</Name>
<Age>22</Age>
<Addr>
<Street>Street2</Street>
<City>City2</City>
</Addr>
</Employees>
</depttable>
After this I find the following in the EMPLOYEES_TABLE:
SQL> select * from EMPLOYEES_TABLE;
SYS_NC_ROWINFO$
<Employees>
<Name>ABC</Name>
<Age>11</Age>
<Addr>
<Street>Street1</Str
<Employees>
<Name>DEF</Name>
<Age>22</Age>
<Addr>
<Street>Street2</Str
SYS_NC_ROWINFO$
<Employees>
<Name>ABC</Name>
<Age>11</Age>
<Addr>
<Street>Street1</Str
<Employees>
<Name>DEF</Name>
<Age>22</Age>
<Addr>
SYS_NC_ROWINFO$
<Street>Street2</Str
SQL> select count(*) from EMPLOYEES_TABLE;
COUNT(*)
4
What's wrong here?
Thanks for your help,
AndreasPhysical design is different depending on the DB, so let's start there, e.g. the Dim tables have unique indices built on the DIM IDs, but in Oracle - the fact table (Non-transactional and no Line Item/High cardinality dims) would just have bitmap indices, so not having a unique index on the fact table is not an issue in Oracle.
What DB and version?
Do any of the Dims have more than 16 charateristics in them?
Are there concurrent loads to the InfoCube from different data sources?
Is Number Range buffering used for any of the dimensions?
Key figure(s) identical values, or are they different? -
Duplicate Entries in Flashback Table when queried using as of timestamp
Hi All,
Oracle Version : Oracle Server - Enterprise Edition 11.1.0.7
OS: HP-UX PA-RISC (64-bit)
We have a table name DIRECTORY_LISTING_GROUP with HEADER_KEY as primary key.
So when i query like this
SELECT * FROM DIRECTORY_LISTING_GROUP AS OF TIMESTAMP TO_TIMESTAMP('05-NOV-12 10:00:00','DD-MON-YY HH24:MI:SS') WHERE HEADER_KEY=#
Ideally i should get only one row but i m getting two rows which are exactly the same.
Please advicePeter vd Zwan wrote:
Hi,
Maybe it is a primary key now but are you sure it was a primary key at 05-NOV-12 10:00:00 ?If it was not primary key at 05-NOV-12 10:00:00, and now it is,
which implies primary key constraint was added using ALTER TABLE command.
But using ALTER TABLE command would invalidate the undo data for that table. And using the flashback query would generate exception something like "table definition has changed". -
Trick to remove duplicate entries from tables ?
hi.
i have 53tables which are having duplicate entries and names of all 53 tables r listed in top_t table ?
can any1 provide me solution to show and if possible ask for remove of those duplicates entries from each table if required ?
daily i am removing duplicates manually ....its too tedious now !
can any1 help me out ?Well, I suppose if the duplication is such that
SELECT DISTINCT * FROM tablename;gives you the required result, then you could have a procedure that made a copy of the table, deleted/truncated the original, then inserted the distinct values back into it.
In 10g you could even use flashback to avoid the temp copy - but it also means you can't use TRUNCATE so whether it's any more efficient I'm not sure. But just for fun and since it's urgent:
CREATE OR REPLACE PROCEDURE dedupe_table
( p_table_name user_tables.table_name%TYPE )
IS
k_start_timestamp TIMESTAMP := SYSTIMESTAMP;
BEGIN
SAVEPOINT start_of_dedupe;
BEGIN
EXECUTE IMMEDIATE 'DELETE ' || p_table_name;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK TO start_of_dedupe;
RAISE_APPLICATION_ERROR
( -20000
, 'Error deleting ' || UPPER(p_table_name) ||
CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
, TRUE );
END;
BEGIN
EXECUTE IMMEDIATE
'INSERT INTO ' || p_table_name ||
' SELECT DISTINCT * FROM ' || p_table_name || ' AS OF TIMESTAMP :b1'
USING k_start_timestamp;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK TO start_of_dedupe;
RAISE_APPLICATION_ERROR
( -20000
, 'Error repopulating ' || UPPER(p_table_name) ||
CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
, TRUE );
END;
END dedupe_table;
SQL> select * from wr_test;
COL1 C C
1 A B
1 A B
2 C D
2 C D
4 rows selected.
SQL> BEGIN
2 dedupe_table('WR_TEST');
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> select * from wr_test;
COL1 C C
1 A B
2 C D
2 rows selected.I make no claims for robustness, efficiency or human safety.
Edited by: William Robertson on Sep 24, 2009 7:12 PM -
Duplicate entries in Table T5UGJ - Garnishment notice letters printed twice
Hi Experts,
We have a scenario where duplicate entries have been created for an employee in the table T5UGJ. Hence when the notice letters were printed, they printed twice.
Would there be any specific reason or any master data change in IT 0194 / IT195 which would trigger a duplicate entry in this table?
Any information is highly appreciated.
Thanks,
Dipesh.Hi Arti,
Please find my responses below :
1. The employee has two different Creditor garnishments, one dated for June and second for July.
2. The duplicate notice letters are printed for second garnishment
Thanks,
Dipesh -
Eleminating duplicate entries in table
How to remove the duplicate entries from the tables or internal tables.
Thankyou for your time in giving the answers.
Bhaskar.Hi,
For Internal tables use,
DELETE ADJACENT DUPLICATES FROM itab.
If u want to delete the duplicate entries depending on one or 2 columns then u can use
DELETE ADJACENT DUPLICATES FROM itab COMPARING f1 f2.
Rgds,
Prakash
Maybe you are looking for
-
Does labview 5.0 support serial communication at a baud rate of 115200?
When I try to initialise my serial port at 115200 baud rate I get error 32, device paramter error. I'm running labview 5.0. Can anyone help me with this?
-
I'm sort of new to Adobe Javascript, but why does this resolve to the right node and give the correct value, [FormCalc] var x = xfa.sourceSet.TestDataConnection1.#command.query.select.value; xfa.host.messageBox(x); but not this: [Javascript] var x =
-
Is it possible to pass a null value to a method?
is it possible to pass a null value to a method? like this public String getParameterXX(String testvalue) String strX = "whatever"; if(testvalue!=null) strX = strX + " man " ; Is this possible ? is this legal String i = getParameterXX(null);
-
We are in the process of upgrading from CS3 to CS5.5. With all of the discussions about backwards compatibility issues, my concern is what will happen with a open my CS3 files in CS5.5. How much will I lose in the process? Like other discussions t
-
Does tab strip control work in LSMW
does tab strip control work in LSMW or not if yes give me a scenario