Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, which part of the script do I place the recno() function? I just want to count the number of duplicate rows and display in a table. Thanks.
Hi,
RecNo() is used in script like this
LOAD
*,
RecNo() AS RecordNumber
FROM DataSource;
Regards,
jagan.
Oh thank you, I've tried that, but how do I determine the number of duplicate rows each record has? I have many records that have many duplicates and also records that only appear once, and I want to create another column that displays the number of duplicate rows for each record. Thanks.
HI,
Attach some sample data and list some duplicate rows, so that it would be easier to give solution.
REgards,
Jagan.
Hi,
You can use this simple example in your script for count the duplicate records and tag the duplicate records rows also see the script
Source:
LOAD * Inline
[
ID
A
A
A
B
C
C
C
D
D
D
E
];
CountTable:
LOAD
ID,
Count(ID) as Count
Resident Source
Group By ID;
InfoTable:
LOAD
ID,
Count,
If(Count > 1,'Duplicate Records','No Duplicates') as Details
Resident CountTable;
DROP Table CountTable;