Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access, splitting the table

Status
Not open for further replies.

Valeriya

MIS
Jan 9, 2006
138
US
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"


 
You need to be clearer in what you want to accomplish, I'm not sure what your goal is.
 
Actually I'm trying to split those items in two groups:
1st Group would be "Trully Returned/Implanted Item":
compare two same Item_IDs by lenght of MonthDescrepant(if Item_ID that has a comment is less than the same Item_ID, but without comment, say " trully returned.." (that basically means if particular item was returned one month ago and never been conted after,that is a true return)
2nd Group would be "False Returned/Implanted Item":
Compare two same Item_IDs by theit lenght of Discrepancy
(if Item_ID that has a comment is greater that doesn't has a comment, say "false..") - This means if the Item_ID was appeared as "retuned" item 3 month ago, and then appeared in this table without a comment 1 and 2 month ago(which means this item was reported beeing counted on a consignment and haven't phisically come back to our warehouse)


TID DateDifference 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
1773119 2 SGTC00002498137
1773119 12 SGTC00002498137 Implanted
1779346 2 SGTC00001294572

Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top