Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table similar to the below one, i am trying to get rid of duplicate values based on entire row.
for example, i need either row 2 or 3, but not both... also for 3 and 4, and 5,6.
How to work with Distinct function in this situation ?
to get distinct row based on all columns, Thanks in advance.
Appreciate your help.
ROW.NO | ID | ORDER | VERSION | NUMBER_IN | NUMBER_OUT |
1 | QHY78G | 731001 | 1E5T7 | 13500 | 24960 |
2 | QHY78G | 870154 | 1E5T7 | 13500 | 25618 |
3 | QHY78G | 870154 | 1E5T7 | 13500 | 25618 |
4 | QHY78G | 670355 | 1E5T7 | 13500 | 24590 |
5 | QHY78G | 670355 | 1E5T7 | 13500 | 24590 |
6 | QHY78G | 483106 | 1E5T7 | 13500 | 24590 |
7 | QHY78G | 483106 | 1E5T7 | 13500 | 24590 |
8 | QHY78G | OK | 1E5T7 | 13500 | 24590 |
Hi, Peekay
Please find my solution below
Hope this helps
ZZ
Hi ZZ,
it worked. Thanks.
Now have a different issue.
if there is an additional column, and values are different in it, how to choose only one row ??
let me take an example...
in the below example, for each 2 similar rows, there is a difference in one column (highlighted in red)
i want to get only one of those values. either max or min of VALUE , some logic like that.
appreciate if you could help, Thanks in advance.
ROW.NO | ID | ORDER | VERSION | NUMBER_IN | NUMBER_OUT | VALUE | CODE | ZIP |
1 | QHY78G | 731001 | 1E5T7 | 13500 | 24960 | 10 | CC | BY96 |
2 | QHY78G | 870154 | 1E5T7 | 13500 | 25618 | 29 | AB | A23 |
3 | QHY78G | 870154 | 1E5T7 | 13500 | 25618 | 30 | AB | A23 |
4 | QHY78G | 670355 | 1E5T7 | 13500 | 24590 | 29 | CD | B1E |
5 | QHY78G | 670355 | 1E5T7 | 13500 | 24590 | 29 | XY | B1E |
6 | QHY78G | 483106 | 1E5T7 | 13500 | 24590 | 12 | BZ | AZ45 |
7 | QHY78G | 483106 | 1E5T7 | 13500 | 24590 | 12 | BZ | XY36 |
8 | QHY78G | OK | 1E5T7 | 13500 | 24590 | 10 | CC | AX78 |
Hi, Peekay
Here you go
Hope this make sense.
ZZ
Thank you ZZ, It worked 🙂 🙂