I Have a query result with many fields, and i have to insert only unique rows in the collection based on the 3 columns of the table using java code.
Suppose query result is like below :
Col A | Col B | Col C | Col D| Col E
1 | 2 | 1 | V1 | A
1 | 2 | 1 | V2 | A
2 | 1 | 1 | V3 | B
3 | 2 | 2 | V4 | C
2 | 1 | 1 | V5 | B
Here for row 1 and 2 are duplicate as per combination of col A + Col B + Col C and row 3 and row 5 are also duplicate.
So i have to insert only unique values in the collection based on col A,col B and Col C
Result :Row 1,3,4 should be interested in the collection rest shouldn't. Please suggest me solution.