ragnarok75
MIS
I need the right way to go about the following scenario:
I need to update tableD with values from tableA, tableB, and multiple values from tableC.
Tables\Fields Record1 Record2 Record3
TableA
FldNumA 1
TableB
FldNumB 5
TableC
XYNum 100 200 B67
TableD
FldNumA 1 1 1
FldNumB 5 5 5
XYNum 100 200 B67
There is one TableA.FldNumA for TableB.FldNumB but there are multiple TableC.XYNum. I need to create records in TableD for all the TableC.XYNum that relate to TableA.FldNumA and TableB.FldNumB.
Right now I am trying to accomplish this using an insert statement that is launched by clicking a button on a form that has TableA and TableB loaded. The multiple values from TableC are loaded via a query, but I do not know how to cycle through the records in the query with the insert statement. Also, since XYNum can be numbers and letters, or just numbers I am having issue with the insert statement handling both data types.
Is there a better way to do this? Any ideas are appreciated!!
I need to update tableD with values from tableA, tableB, and multiple values from tableC.
Tables\Fields Record1 Record2 Record3
TableA
FldNumA 1
TableB
FldNumB 5
TableC
XYNum 100 200 B67
TableD
FldNumA 1 1 1
FldNumB 5 5 5
XYNum 100 200 B67
There is one TableA.FldNumA for TableB.FldNumB but there are multiple TableC.XYNum. I need to create records in TableD for all the TableC.XYNum that relate to TableA.FldNumA and TableB.FldNumB.
Right now I am trying to accomplish this using an insert statement that is launched by clicking a button on a form that has TableA and TableB loaded. The multiple values from TableC are loaded via a query, but I do not know how to cycle through the records in the query with the insert statement. Also, since XYNum can be numbers and letters, or just numbers I am having issue with the insert statement handling both data types.
Is there a better way to do this? Any ideas are appreciated!!