‎2007 Oct 25 8:34 AM
hii the data in internal table is like this
i want to delete duplicate record if exists co mparing all fields
BUT WHEN I AMD DOING
delete adjacent duplicates from it_dup_record comparing all fields.
ITS NOT DELETING THE DUPLICATE RECORD AS IN BOLD IT IS STILL THERE IN THE INTERNAL TABLE WHY PLS SUGGEST?
ALL THREE FIELDS ARE PRIMARY KEY BUT I DONT THING THAT HAS TO DO ANYTHING WITH INTERNAL TABLE I JUST WANT TO DELTE THE DUPLICATE RECORDS IF ANY EXAXTLY SIMILAR AND SAME IE ALL THREE FIELDS
CUSTEOMER NAME AND EMAIL IS SAME FOR THE TWO RECORDS THEN I WANT TO DELTE
PLS SUGGEST ASAP
|0000000011|Cypress Semiconduct<12 |0000000011|Cypress Semiconduct<12345dfdfdfdfd
<b> |0000000011|Cypress Semiconduct<13
|0000000011|Cypress Semiconduct<13 </b>
|0000000011|Cypress Semiconduct<13456dfdfddfdfdfdfd
‎2007 Oct 25 8:40 AM
HI,
Try like this..
Sort the table first ...
and then write delete statement without any comparision ..
Regards,
Omkar.
‎2007 Oct 25 8:40 AM
Hi Nishant.,.,
delete adjacent duplicates from it_dup_record comparing all fields.
dont give comparing all fields
Before that
SORT it_dup_record.(Based on Primery Key.,.,in ur case 3 are there right.,)
DELETE ADJACENT DUPLICATES FROM it_dup_record .
it will solve ur problem
Deb
Message was edited by:
Debasish Das
‎2007 Oct 25 8:41 AM
Sort the internal table first with the 3 fields which you want.
Then use the Delete Adjacenet Duplicates statement to delete the duplicate entires in that internal table.
Hope this sovles
Regards
Gopi
‎2007 Oct 25 10:49 AM
Hi Arora,
Try this.
sort it_dup_record by customer name email.
delete adjacent duplicates from it_dup_record.
or
sort it_dup_record by customer name email.
delete adjacent duplicates from it_dup_record comparing customer name email.
Reward if useful.
Regards,
Chitra
‎2007 Oct 29 3:06 AM
hi all
i ahve found the solution
it should be delete adjacent duplicate by all primary key name ie pk1 pk2 pk3
comparing all fields somtimes dont delete the records
arora
‎2007 Nov 05 9:30 AM