Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
How to find the duplicate
When the ID1 & ID2 combination repeats same then the record to be markes as duplicate
for example in the below attached file the second and Third row value of XRAY should be marked as duplicate
expected Outuput:
Thanks in Advance
@Prabhu1204 Please use the below Script:
NoConcatenate
Temp:
Load * Inline [
ID1, ID2, Value1
XRAY, 6768,100
XRAY, 6768,100
XRAY, 6768,100
XRAY, 6768,100
STA,897,100
STA,897,100
STA,897,100
];
NoConcatenate
Temp1:
Load *,
if(ID2=Peek(ID2),'Duplicate','Not Duplicate') as Condition
Resident Temp;
Drop table Temp;
Exit Script;
maybe one solution could be:
table1:
LOAD RecNo() as RecNo, *,
ID1&ID2 as ID12,
If(Exists(ID12, ID1&ID2),'Duplicate','Non Duplicate') as Flag
Inline [
ID1, ID2, Value
XRAY, 6768, 100
XRAY, 6768, 100
XRAY, 6768, 100
XRAY, 6768, 100
STA, 897, 100
STA, 897, 100
STA, 897, 100
ABC, 123, 100
ABC, 123, 100
XRAY, 6768, 100
STA, 897, 100
];
DROP Field ID12;
@Prabhu1204 Please use the below Script:
NoConcatenate
Temp:
Load * Inline [
ID1, ID2, Value1
XRAY, 6768,100
XRAY, 6768,100
XRAY, 6768,100
XRAY, 6768,100
STA,897,100
STA,897,100
STA,897,100
];
NoConcatenate
Temp1:
Load *,
if(ID2=Peek(ID2),'Duplicate','Not Duplicate') as Condition
Resident Temp;
Drop table Temp;
Exit Script;
maybe one solution could be:
table1:
LOAD RecNo() as RecNo, *,
ID1&ID2 as ID12,
If(Exists(ID12, ID1&ID2),'Duplicate','Non Duplicate') as Flag
Inline [
ID1, ID2, Value
XRAY, 6768, 100
XRAY, 6768, 100
XRAY, 6768, 100
XRAY, 6768, 100
STA, 897, 100
STA, 897, 100
STA, 897, 100
ABC, 123, 100
ABC, 123, 100
XRAY, 6768, 100
STA, 897, 100
];
DROP Field ID12;