I've got the table that needs to be split up:
Item_ID MonthDiscrepant Bin Comment
030053-094-405 1 SGTC00004008120 returned
030053-094-405 2 SGTC00004008120
030053-095-405 1 SGTC00004008120 returned
030053-095-405 2 SGTC00004008120
030053-104-405 1 SGTC00286599120 returned
030053-104-405 4 SGTC00286599120
030053-104-405 13 SGTC00286599120 OnHand
040095-053-708 1 SGTC00240203659
040095-053-708 3 SGTC00240203659 implanted
050157-031-904 1 SGTC00001771142
050157-031-904 3 SGTC00001771142 implanted
1617843 1 SGTC00002041574
1617843 29 SGTC00002041574 Returned
Trying to figure out how to sort this table, according to the following logic:
If [Item_ID with comment].[MonthDiscrepant]< than [same Item_ID without comment].[MonthDiscrepant],"true returned or implanted"
If [Item_ID with comment].[MonthDiscrepant]> than [same Item_ID without comment].[MonthDiscrepant],"was counted aftre it was returned or implanted"
Item_ID MonthDiscrepant Bin Comment
030053-094-405 1 SGTC00004008120 returned
030053-094-405 2 SGTC00004008120
030053-095-405 1 SGTC00004008120 returned
030053-095-405 2 SGTC00004008120
030053-104-405 1 SGTC00286599120 returned
030053-104-405 4 SGTC00286599120
030053-104-405 13 SGTC00286599120 OnHand
040095-053-708 1 SGTC00240203659
040095-053-708 3 SGTC00240203659 implanted
050157-031-904 1 SGTC00001771142
050157-031-904 3 SGTC00001771142 implanted
1617843 1 SGTC00002041574
1617843 29 SGTC00002041574 Returned
Trying to figure out how to sort this table, according to the following logic:
If [Item_ID with comment].[MonthDiscrepant]< than [same Item_ID without comment].[MonthDiscrepant],"true returned or implanted"
If [Item_ID with comment].[MonthDiscrepant]> than [same Item_ID without comment].[MonthDiscrepant],"was counted aftre it was returned or implanted"