How to collect adjacent duplicates ?
Hi,
duplicte values can be deleted using 'DELETE ADJACENT DUPLICATES'. But how to collect the field values that are duplicated into another internal table.
Hi Sharmila,
You can use the statement 'FIND IN TABLE itab ' for your purpose. Have a look at following code.
Ex:
TYPES:
BEGIN OF ty_itab,
name TYPE char10,
id TYPE numc5,
END OF ty_itab.
DATA:
itab TYPE STANDARD TABLE OF ty_itab,
itab2 TYPE match_result_tab,
itab3 TYPE STANDARD TABLE OF ty_itab,
wa_itab TYPE ty_itab.
CLEAR wa_itab.
wa_itab-name = 'Test'.
wa_itab-id = 1.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test'.
wa_itab-id = 1.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test'.
wa_itab-id = 1.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test2'.
wa_itab-id = 2.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test2'.
wa_itab-id = 2.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test3'.
wa_itab-id = 3.
APPEND wa_itab TO itab.
CLEAR wa_itab.
wa_itab-name = 'Test4'.
wa_itab-id = 4.
APPEND wa_itab TO itab.
CLEAR wa_itab.
SORT itab.
Logic
LOOP AT itab INTO wa_itab.
AT NEW id.
FIND ALL OCCURRENCES OF wa_itab
IN TABLE itab
RESPECTING CASE
RESULTS itab2.
DESCRIBE TABLE itab2 LINES v_count.
v_count = v_count - 1.
IF NOT v_count IS INITIAL.
DO v_count TIMES.
APPEND wa_itab TO itab3.
ENDDO.
ENDIF.
CLEAR: wa_itab.
ENDAT.
ENDLOOP.
But you have to keep in mind that..the field which is used along with AT NEW statement should be
last one in your internal table so that it checks all the components left of that field for duplicates.
If you want any more help, you can get back to me.
Regards,
Jallu
Similar Messages
-
Delete adjacent duplicates how to use in the below select statement
hi i have a problem
i am suing the below select statement
SELECT a~extno
a~guid_lclic " for next select
e~ctsim
e~ctsex
*revised spec 3rd
f~guid_pobj
f~amnt_flt
f~amcur
f~guid_mobj
e~srvll "pk
e~ctsty "PK
e~lgreg "PK
INTO TABLE gt_sagmeld
FROM /SAPSLL/LCLIC as a
INNER JOIN /sapsll/tlegsv as e on elgreg = algreg
inner join /sapsll/legcon as f on fguid_lclic = aguid_lclic " for ccngn1 selection
inner join /sapsll/corcts as g on gguid_pobj = fguid_pobj
where a~extno in s_extno.
sort gt_sagmeld by guid_lclic lgreg ctsty srvll GUID_POBJ GUID_MOBJ.
delete adjacent duplicates from gt_sagmeld comparing guid_lclic lgreg ctsty srvll GUID_POBJ GUID_MOBJ .
now i am confused how to use delete adjacent dupliacate and on which fields
as first table /sal../lclic primary key is guid_lclic
and it is joined to table
legcon by guid_lclci ( not a primary key here)
legcon primary key is guid_legcon
and table 3 legsv by lgreg (pk here)
table 3 has tow more primary key srvll and ctsty also
NOW MY QUESTIO IS TAHT IS I USE ABOVE DELETE ADJACENT STATMENT IT FETCHES 20 LAKH RECORDS
I WANT TO REDUCE IS LET ME KNOW ON WHAT fields i need to use delete adjacen duplicates
or use comparing all fields?
regards
Arorahi sudha
if u see my select statement is contains four Primary keys
srvll
lgreg
ctsty
guid_lclic
but the next table connected to this table legcon is by guid_pobj and anothe table by guid_mobj
and if i take this gt_sagmeld to another temp table and i find abt 10 lakh uniques guid_pobj
similary 6 lakh guid_mobj so the next slect is hanpering because of this
not COMING TO OUR POINT IF I SORT ONLY BY OUR PRIMARY KEYS NOT TAKING INTO ACCOUNT TEH GUID_POBJ AND GUID_MOBJ
THE ENTRIES ARE VERY LESS BUT IF I TAKE INOT ACCCOUNT IN GT_SAGMELD THE ENTRIES ARE ABT 20 LAKH
SO I AM NOT SURE WHETHER TO TAKNE GUID_POBJ AND GUID_MOBJ INOT ACCOUNT FOR DELECTING ADJACENT DUPLICATES?
HENCE THE QUESTION OF ON WHICH FIRLD DELETE OR COMPARING ALL FIELDS I USE? -
How to use 'DELETE ADJACENT DUPLICATES FROM' for deleting as some field
How to use 'DELETE ADJACENT DUPLICATES FROM' for deleting as some field
eg:
I have a inner table ,it contains a field named ast_guid,now,I search ten records,contains some duplicate records in the field of ast_guid.but I can not delete the duplicate records as ast_guid.If the type of inner table is standard table, you should sort the inner table by the fields before user 'DELETE ADJACENT DUPLICATES ', and use COMPARING addtion.
Edited by: Justin on Jun 28, 2009 9:48 AM -
How to find out duplicate record contained in a flat file
Hi Experts,
For my project I have written a program for flat file upload.
Requirement 1
In the flat file there may be some duplicate record like:
Field1 Field2
11 test1
11 test2
12 test3
13 test4
Field1 is primary key.
Can you please let me know how I can find out the duplicate record.
Requirement 2
The flat file contains the header row as shown above
Field1 Field2
How our program can skip this record and start reading / inserting records from row no 2 ie
11 test1
onwards.
Thanks
S
FORM upload1.
DATA : wf_title TYPE string,
lt_filetab TYPE filetable,
l_separator TYPE char01,
l_action TYPE i,
l_count TYPE i,
ls_filetab TYPE file_table,
wf_delemt TYPE rollname,
wa_fieldcat TYPE lvc_s_fcat,
tb_fieldcat TYPE lvc_t_fcat,
rows_read TYPE i,
p_error TYPE char01,
l_file TYPE string.
DATA: wf_object(30) TYPE c,
wf_tablnm TYPE rsdchkview.
wf_object = 'myprogram'.
DATA i TYPE i.
DATA:
lr_mdmt TYPE REF TO cl_rsdmd_mdmt,
lr_mdmtr TYPE REF TO cl_rsdmd_mdmtr,
lt_idocstate TYPE rsarr_t_idocstate,
lv_subrc TYPE sysubrc.
TYPES : BEGIN OF test_struc,
/bic/myprogram TYPE /bic/oimyprogram,
txtmd TYPE rstxtmd,
END OF test_struc.
DATA : tb_assum TYPE TABLE OF /bic/pmyprogram.
DATA: wa_ztext TYPE /bic/tmyprogram,
myprogram_temp TYPE ziott_assum,
wa_myprogram TYPE /bic/pmyprogram.
DATA : test_upload TYPE STANDARD TABLE OF test_struc,
wa2 TYPE test_struc.
DATA : wa_test_upload TYPE test_struc,
ztable_data TYPE TABLE OF /bic/pmyprogram,
ztable_text TYPE TABLE OF /bic/tmyprogram,
wa_upld_text TYPE /bic/tmyprogram,
wa_upld_data TYPE /bic/pmyprogram,
t_assum TYPE ziott_assum.
DATA : wa1 LIKE test_upload.
wf_title = text-026.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = wf_title
default_extension = 'txt'
file_filter = 'Tab delimited Text Files (*.txt)'
CHANGING
file_table = lt_filetab
rc = l_count
user_action = l_action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
OTHERS = 3. "#EC NOTEXT
IF sy-subrc 0.
EXIT.
ENDIF.
LOOP AT lt_filetab INTO ls_filetab.
l_file = ls_filetab.
ENDLOOP.
CHECK l_action = 0.
IF l_file IS INITIAL.
EXIT.
ENDIF.
l_separator = 'X'.
wa_fieldcat-fieldname = 'test'.
wa_fieldcat-dd_roll = wf_delemt.
APPEND wa_fieldcat TO tb_fieldcat.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
CLEAR wa_test_upload.
Upload file from front-end (PC)
File format is tab-delimited ASCII
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
has_field_separator = l_separator
TABLES
data_tab = i_mara
data_tab = test_upload
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc 0.
EXIT.
ELSE.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
IF test_upload IS NOT INITIAL.
DESCRIBE TABLE test_upload LINES rows_read.
CLEAR : wa_test_upload,wa_upld_data.
LOOP AT test_upload INTO wa_test_upload.
CLEAR : p_error.
rows_read = sy-tabix.
IF wa_test_upload-/bic/myprogram IS INITIAL.
p_error = 'X'.
MESSAGE s153 WITH wa_test_upload-/bic/myprogram sy-tabix.
CONTINUE.
ELSE.
TRANSLATE wa_test_upload-/bic/myprogram TO UPPER CASE.
wa_upld_text-txtmd = wa_test_upload-txtmd.
wa_upld_text-txtsh = wa_test_upload-txtmd.
wa_upld_text-langu = sy-langu.
wa_upld_data-chrt_accts = 'xyz1'.
wa_upld_data-co_area = '12'.
wa_upld_data-/bic/zxyzbcsg = 'Iy'.
wa_upld_data-objvers = 'A'.
wa_upld_data-changed = 'I'.
wa_upld_data-/bic/zass_mdl = 'rrr'.
wa_upld_data-/bic/zass_typ = 'I'.
wa_upld_data-/bic/zdriver = 'yyy'.
wa_upld_text-langu = sy-langu.
MOVE-CORRESPONDING wa_test_upload TO wa_upld_data.
MOVE-CORRESPONDING wa_test_upload TO wa_upld_text.
APPEND wa_upld_data TO ztable_data.
APPEND wa_upld_text TO ztable_text.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM ztable_data.
DELETE ADJACENT DUPLICATES FROM ztable_text.
IF ztable_data IS NOT INITIAL.
CALL METHOD cl_rsdmd_mdmt=>factory
EXPORTING
i_chabasnm = 'myprogram'
IMPORTING
e_r_mdmt = lr_mdmt
EXCEPTIONS
invalid_iobjnm = 1
OTHERS = 2.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
**Lock the Infoobject to update
CALL FUNCTION 'RSDG_IOBJ_ENQUEUE'
EXPORTING
i_objnm = wf_object
i_scope = '1'
i_msgty = rs_c_error
EXCEPTIONS
foreign_lock = 1
sys_failure = 2.
IF sy-subrc = 1.
MESSAGE i107(zddd_rr) WITH wf_object sy-msgv2.
EXIT.
ELSEIF sy-subrc = 2.
MESSAGE i108(zddd_rr) WITH wf_object.
EXIT.
ENDIF.
*****Update Master Table
IF ztable_data IS NOT INITIAL.
CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
EXPORTING
i_iobjnm = 'myprogram'
i_tabclass = 'M'
I_T_ATTR = lt_attr
TABLES
i_t_table = ztable_data
EXCEPTIONS
attribute_name_error = 1
iobj_not_found = 2
generate_program_error = 3
OTHERS = 4.
IF sy-subrc 0.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'E'
txtnr = '054'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
MESSAGE e054(zddd_rr) WITH 'myprogram'.
ELSE.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'S'
txtnr = '053'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
ENDIF.
*endif.
*****update Text Table
IF ztable_text IS NOT INITIAL.
CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
EXPORTING
i_iobjnm = 'myprogram'
i_tabclass = 'T'
TABLES
i_t_table = ztable_text
EXCEPTIONS
attribute_name_error = 1
iobj_not_found = 2
generate_program_error = 3
OTHERS = 4.
IF sy-subrc 0.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'E'
txtnr = '055'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
ENDIF.
ENDIF.
ELSE.
MESSAGE s178(zddd_rr).
ENDIF.
ENDIF.
COMMIT WORK.
CALL FUNCTION 'RSD_CHKTAB_GET_FOR_CHA_BAS'
EXPORTING
i_chabasnm = 'myprogram'
IMPORTING
e_chktab = wf_tablnm
EXCEPTIONS
name_error = 1.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
****Release locks on Infoobject
CALL FUNCTION 'RSDG_IOBJ_DEQUEUE'
EXPORTING
i_objnm = 'myprogram'
i_scope = '1'.
ENDIF.
ENDIF.
PERFORM data_selection .
PERFORM update_alv_grid_display.
CALL FUNCTION 'MESSAGES_SHOW'.
ENDFORM.Can you please let me know how I can find out the duplicate record.
you need to split the records from flat file structure into your internal table ans use a delete ADJACENT duplicates comparing fields
split flat_str into wa_f1 wa_f2 wa_f2 at tab_space. -
Problem using DELETE ADJACENT DUPLICATES with dynamic table
Hello All,
In my program i have to delete duplicate records from dynamic table.
I tried using DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING <fieldname1> <fieldname2> but it fails in syntax check, then i tried like below:
DATA string type string.
string = '<fieldname1> <fieldname2>.........'.
DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING (string).
It also got failed at runtime.
Please suggest how can i achieve this....
Regards
Munish GargHi,
this code is worked truly.
You can try this.
Regards.
DATA itab LIKE STANDARD TABLE OF mard.
SELECT * FROM mard INTO TABLE itab UP TO 100 ROWS.
* You define max number of the field that you need
data : cmp01 TYPE string,
cmp02 TYPE string,
cmp03 TYPE string,
cmp04 TYPE string,
cmp05 TYPE string.
* You fill the fields that you need, others is clear.
cmp01 = 'MATNR'.
cmp02 = 'WERKS'.
CLEAR : cmp03,cmp04,cmp05.
SORT itab BY (cmp01) (cmp02) (cmp03) (cmp04) (cmp05).
DELETE ADJACENT DUPLICATES FROM itab COMPARING (cmp01) (cmp02) (cmp03)
(cmp04) (cmp05). -
Using: Delete Adjacent Duplicates
Hi,
How can we use Delete Adjacent Duplicates where comparing clause is dynamic.
The the number of comparison characteristics are dependent on some other conditions and are decided at runtime. Also can this be used with Field-Symbols.
ArunavaHi Arunava,
The following were taken from ABAP key word documentation.
1. The DELETE ADJACENT DUPLICATES statement works particularly well if you have sorted the internal table itab according to the fields that you want to compare when looking for duplicates. In this case, deleting adjacent duplicates is the same as deleting all duplicates. The direction of the sort is irrelevant.
2. <b>If you do not know a comparison expression until runtime, you can specify it dynamically as the contents of the field name in the expression COMPARING ... (name) .... If name is empty at runtime, the comparison expression is ignored. If name contains an invalid component name, a runtime error occurs.</b>
3. You can further restrict comparison expressions - both static and dynamic - by specifying offset and length.
Regards
Raja -
Delete adjacent duplicates from dynamic table
Hi all,
How to do delete adjacent <tab> comparing f1 f2 f3 for a dynamic table.
Thx in advance
Edited by: Misha Denis on Feb 14, 2010 9:28 AM
Moderator message - Cross post locked
Edited by: Rob Burbank on Feb 14, 2010 3:45 PMyou can use a function GET_COMPONENT_LIST to get all the fields' name after the dynamic table generated. then you can use the field name in the statement "DELETE....COMPARE "
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = SY-REPID
fieldname = THE_NAME_OF_THE_DYNAMIC_INTERNAL_TABLE
tables
components = ITAB
LOOP AT ITAB.
*ASSIGN THE ITAB-COMPNAME TO SOME VARIANTS:FIELD1,FIELD2,FIELD3.
ENDLOOP.
SORT THE_NAME_OF_THE_DYNAMIC_INTERNAL_TABLE BY FIELD1 FIELD2 FIELD3.
DELETE ADJACENT DUPLICATES FROM THE_NAME_OF_THE_DYNAMIC_INTERNAL_TABLE COMPARING FIELD1 FIELD2 FIELD3. -
Hi All,
How to copy the duplicates from sorted internal table values into other internal table.
Thanks,
VenkatPlease see the following example. this program pulls out records only when they have a duplicate entry in the table. In this case, the record with GHI will be outputed.
report zrich_0001.
data: begin of itab occurs 0,
f1 type c,
f2 type c,
f3 type c,
end of itab.
data: begin of itabx occurs 0,
f1 type c,
f2 type c,
f3 type c,
end of itabx.
data: begin of itabo occurs 0,
f1 type c,
f2 type c,
f3 type c,
end of itabo.
data: counter type i.
itab = 'ABC'. append itab.
itab = 'DEF'. append itab.
itab = 'GHI'. append itab.
itab = '123'. append itab.
itab = '456'. append itab.
itab = '789'. append itab.
itab = 'GHI'. append itab.
itabx[] = itab[].
sort itabx ascending.
sort itab ascending.
delete adjacent duplicates from itab.
loop at itab.
clear counter.
loop at itabx where f1 = itab-f1
and f2 = itab-f2
and f3 = itab-f3.
counter = counter + 1.
endloop.
if counter > 1.
move itab to itabo.
append itabo.
endif.
endloop.
* Output the record that had a duplicate entry
loop at itabo.
write:/ itabo.
endloop.
Regards,
Rich Heilman -
i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
SQL> desc sms1;
Name Null? Type
MOBILE NUMBER
RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
SNO NUMBER
INDATE DATE
From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
SQL> desc smssplit;
Name Null? Type
R VARCHAR2(2 CHAR)
C VARCHAR2(2 CHAR)
S VARCHAR2(1 CHAR)
TC VARCHAR2(3 CHAR)
NA VARCHAR2(3 CHAR)
TC2 VARCHAR2(3 CHAR)
NA2 VARCHAR2(3 CHAR)
TC3 VARCHAR2(3 CHAR)
NA3 VARCHAR2(3 CHAR)
TC4 VARCHAR2(3 CHAR)
NA4 VARCHAR2(3 CHAR)
WTHER VARCHAR2(10 CHAR)
SNO NUMBER
INSERTDATA VARCHAR2(25 CHAR)
Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
CREATE OR REPLACE PROCEDURE SPLITSMS
AS
BEGIN
INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
END;
Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
DECLARE
X NUMBER;
JobNumber NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
job => X
,what => 'scott.SPLITSMS;'
,next_date => SYSDATE+1/1440
,interval => 'SYSDATE+1/1440 '
,no_parse => FALSE
:JobNumber := to_char(X);
END;
Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
Now I do not want the duplicate values to be updated ...and want them to ignore them.....
please I need a help on this query........How to avoid the duplicate values............Look at the posts closely:might not be needed if formatted ;)
create or replace procedure splitsms as
begin
insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
select substr(rcstcnatcnatcnatcnawther,1,2) r,
substr(rcstcnatcnatcnatcnawther,3,2) c,
substr(rcstcnatcnatcnatcnawther,5,1) s,
substr(rcstcnatcnatcnatcnawther,6,3) tc,
substr(rcstcnatcnatcnatcnawther,9,3) na,
substr(rcstcnatcnatcnatcnawther,12,3) tc2,
substr(rcstcnatcnatcnatcnawther,15,3) na2,
substr(rcstcnatcnatcnatcnawther,18,3) tc3,
substr(rcstcnatcnatcnatcnawther,21,3) na3,
substr(rcstcnatcnatcnatcnawther,24,3) tc4,
substr(rcstcnatcnatcnatcnawther,27,3) na4,
substr(rcstcnatcnatcnatcnawther,30,10) wther,
sno
from scott.sms1 a
where sno = (select max(sno)
from sms1
where sno != a.sno
); ---------------> added where clause with table alias.
end;Regards
Etbin -
How do you delete duplicate tracks off your playlist?!
How do you delete duplicate tracks off your playlist - everytime I connect my hard-drive it adds another of every single track - argh!!!!
I remember there being a 'delete duplicate tracks' option on a much older version of itunes - is this still available and if not if you opt for the 'consolidate library' option will this automatically save to you computer as I have too much music for my laptops memory capacity! On top of that how can I stop this issue from contantly re-occuring everytime I connect my hard-drive?! Apologies if im being thick here.... xX*laura*XxYou are doing something wrong, iTunes doesn't add tracks to the library unless you ask it to, so there is a problem somewhere in your workflow which is creating the duplicates. For example, having iTunes set up to "Copy files to the iTunes Media folder when adding to library" and then repeatedly adding in a folder from an external drive would do it.
Once you've worked out how to stop creating new duplicates you can look at the issue of deduping what you already have. See this recent post for some thoughts and a script that may prove useful.
tt2 -
How do you delete duplicate songs in your library without having to delete each song individually?
mauijiminar wrote:
Go to iTunes, select view and click show duplicates. Hold control and A ( select all) and then delete.
Not a good idea! The "show duplicates" feature shows "all" duplicate tracks, but you only want to delete the "extra" copies, not the "originals".
I've written a script called DeDuper which can help remove unwanted duplicates. See this thread for background, including how to delete the extra tracks manually if you prefer.
tt2 -
Greetings!
After importing my 300 or so CDs into iTunes, I found I have tons of duplicate songs.
Example: I have a song that came in a original album, then in again in a "Greatest Hits" album, then again in a "Hits of the 80's" album, and again in a soundtrack album. I have now have 4 copies of the exact same song.
How do I delete duplicate songs, but keep a link in their original albums back to the single copy of the song left, so it will play in each album in sequence as if it were still there?
I don't think this currently exists, but as my library keeps growing the duplicates keep growing. It would be nice if Apple sees this and adds a way to link songs to multiple albums.
I don't want to create a custom playlist for every album that has a duplicate song or two (I'd have dozens of playlists) - thought about fixing it that way but not really practical.To my knowledge, there is no way of doing what you want. The only workaround is to create playlists for the other albums containing the track, but that isn't practical for most people.
You could provide Apple with feedback here: http://www.apple.com/feedback/itunesapp.html -
How do you delete duplicate photos in the photo section of your iPad?
How do you delete duplicate photos in the photo section of your iPad? My iPad has duplicated n tripled my photos n want let me delete them. I can delete photos from any other section but not in photos, this is taken up all my memory. Help!!
The links below have instructions for deleting photos.
iOS and iPod: Syncing photos using iTunes
http://support.apple.com/kb/HT4236
iPad Tip: How to Delete Photos from Your iPad in the Photos App
http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
Another Way to Quickly Delete Photos from Your iPad (Mac Only)
http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
How to Delete Photos from iPad
http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
How to: Batch Delete Photos on the iPad
http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
(With iOS 5.1, use 2 fingers)
How to Delete Photos from iCloud’s Photo Stream
http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
Cheers, Tom -
How do you delete duplicate songs from an iphone 3gs? I did the automaticly download song feature when doawloading from my CPU and now there are 11 songs that no matter what I do will not come off my phone. I have tried everything. Also how do you shut off this automatic download feature?
Hello momoandfam,
Welcome to Apple Support Communities.
Take a look at the article linked below, it’ll answer your questions about finding and deleting duplicate tracks in your iTunes library.
Find and remove duplicate items in your iTunes library - Apple Support
Take care,
-Jason -
How to delete the duplicate email address in BP master data
Hi,
When you get an email ids from the third party vendor and you are loading into CRM BP master data. how to delete the duplicate email address already exits in the system. In CRM you can create the same BP with different id. I would like to know how to delete the email address during importing email addresses from the third party tool.
During the campaign you are sending email to all your customers, when the customer want to unsubscibe the email address from your list, how to unsubcribe the email address and how to updat the BP master data.
If you are sending the email to customer, you are using html or simple text, if the customer wants only html or simple text, how you to specify in the system?
thanks,
arulHello Arul,
welcome to the SDN CRM Development forum.
1. I think you should clear the data with duplicate E-Mail adresses in the external tool.
2. Unsubscription could be done by a Marketing Attribute which could be set by using a Target Group which is created by Campaign Automation. Have a look at this Toppic. There is also a Best Practice avaliable at http://help.sap.com/bp_crmv340/CRM_DE/index.htm.
3. Also HTML or Simple text can be mained in a Marketing Attribute. You have to use different Mail Forms to which are sent to different Target groups.
Regards
Gregor
Maybe you are looking for
-
This is what I have: a multithreaded C++ app on solaris/sparc with multiple threads writing to a single socket descriptor: write(global_fd, data, len). On the other side of the connection I receive the stream. Writer threads have no mutex when they w
-
Firmware error in upgrading from 10.3.9 to 10.4 on 2001/2002 iMac
I am trying to upgrade some 2001/2002 iMacs from 10.3.9 to 10.4.6. When I start the installation process it says I must update my firmware. I have downloaded and installed the firmware updates from the Apple Site, and then tried again to Install 10.4
-
Start sequence of components and process types
Hi all, I would like to know, is there any particular start sequence of the instance components and process-types while using opmnctl startall, or opmnctl startproc ias-component=..., or opmnctl startproc process-type=... ? Regards
-
Adobe CS2 Q - did everything other posts told me to do.
Hi, before you get frustrated, I have read and implemented most of the suggestions that I could find in these forums... Outline of problem. G5 running latest version of 10.4 with all patches recently applied. CS2 Photoshop will start, but will NOT op
-
I just purchased an 8gb ipod nano and it's giving me problems connecting to my computer. First of all, whenever I plug the nano into my USB chord it ruins my computer and makes it very slow. I've plugged the ipod in maybe 8 times to my computer and o