I have to do something that I'm stumbling on.
I have two tables with matching fields and some matching data.
Two of the fields are box and ID. There are many id's for each box in the tables.
I have to search on box field in table A, then go look for that box in table B and if that box is not in table B, append the Box and all its IDs to table B. If the box is in Table B, then match on Box and ID and update all other fields.
This is where I get lost. If Table A has more records for a Box(combination of Box and ID) I have to append those to Table B.
My code seems convoluted and I'm wondering (if I've made this clear) if anyone can help me with a structure to do something like this.
Any help is appreciated.
I have two tables with matching fields and some matching data.
Two of the fields are box and ID. There are many id's for each box in the tables.
I have to search on box field in table A, then go look for that box in table B and if that box is not in table B, append the Box and all its IDs to table B. If the box is in Table B, then match on Box and ID and update all other fields.
This is where I get lost. If Table A has more records for a Box(combination of Box and ID) I have to append those to Table B.
My code seems convoluted and I'm wondering (if I've made this clear) if anyone can help me with a structure to do something like this.
Any help is appreciated.