boomer1974
MIS
Good Afternoon Experts,
I am in need of some help. I have not written any code for 8 years so I am a bit rusty to say the least I have an item table (70K records) that has 4 fields: Item, Cube, Weight, and Code (code not currently populated). I have a case code table with 8 records, each containing the criteria for determining a case code based on cube and weight. I need to open each record in my item table and cycle through the 8 case code records to find a match where item cube and weight are within the upper and lower threshold for both cube and weight then return the corresponding case code to my "code" field in the item table. I have experimented with several threads and can't seem to modify something successfully to get what I want so I thought I would ask. Any help is appreciated! Below are examples of my two tables (hopefully formatting comes through) Thanks!
Item Table
Item Number Cube Weight Code
12345 0.52 1
Case Code Table
ID case_code cube_low cube_high weight_low weight_high Type
1 S1 0.00 0.10 0 1.00 Easy
2 S3 0.00 0.30 1 4.00 Easy
3 S4 0.00 0.30 4 20.00 Average
4 H1 0.00 3.00 20 50.00 Hard
5 AP 0.00 10.00 70 9999.00 Team
6 H4 0.00 9,999.00 50 70.00 Vary Hard
7 S2 0.10 0.30 0 1.00 Easy
8 S5 0.30 3.00 0 20.00 Average
9 H2 3.00 20.00 0 50.00 Hard
10 TP 10.00 20.00 70 9999.00 Team
11 H3 20.00 9,999.00 0 50.00 Hard
12 T2 20.00 9,999.00 70 9999.00 Team
I am in need of some help. I have not written any code for 8 years so I am a bit rusty to say the least I have an item table (70K records) that has 4 fields: Item, Cube, Weight, and Code (code not currently populated). I have a case code table with 8 records, each containing the criteria for determining a case code based on cube and weight. I need to open each record in my item table and cycle through the 8 case code records to find a match where item cube and weight are within the upper and lower threshold for both cube and weight then return the corresponding case code to my "code" field in the item table. I have experimented with several threads and can't seem to modify something successfully to get what I want so I thought I would ask. Any help is appreciated! Below are examples of my two tables (hopefully formatting comes through) Thanks!
Item Table
Item Number Cube Weight Code
12345 0.52 1
Case Code Table
ID case_code cube_low cube_high weight_low weight_high Type
1 S1 0.00 0.10 0 1.00 Easy
2 S3 0.00 0.30 1 4.00 Easy
3 S4 0.00 0.30 4 20.00 Average
4 H1 0.00 3.00 20 50.00 Hard
5 AP 0.00 10.00 70 9999.00 Team
6 H4 0.00 9,999.00 50 70.00 Vary Hard
7 S2 0.10 0.30 0 1.00 Easy
8 S5 0.30 3.00 0 20.00 Average
9 H2 3.00 20.00 0 50.00 Hard
10 TP 10.00 20.00 70 9999.00 Team
11 H3 20.00 9,999.00 0 50.00 Hard
12 T2 20.00 9,999.00 70 9999.00 Team