I have this data in a table.
OrderNo SeqNo Rep
111111 3 AX1
222222 3 ZT5
333333 1 AB7
333333 3 TM4
444444 1 WA9
When the order number repeats (see order number 333333) I want to return the record with the lowest sequence number. In this case it is order number 333333 with rep AB7 having sequence number 1. I do not want the sequence number returned. I want my output to look like this:
OrderNo Rep
111111 AX1
222222 ZT5
333333 AB7
444444 WA9
Thanks.
OrderNo SeqNo Rep
111111 3 AX1
222222 3 ZT5
333333 1 AB7
333333 3 TM4
444444 1 WA9
When the order number repeats (see order number 333333) I want to return the record with the lowest sequence number. In this case it is order number 333333 with rep AB7 having sequence number 1. I do not want the sequence number returned. I want my output to look like this:
OrderNo Rep
111111 AX1
222222 ZT5
333333 AB7
444444 WA9
Thanks.