How would I go about creating and populating a new Table B based on existing Table A. Both tables have 3 fields. The first 2 fields would have the same values in both tables. However, the 3rd field in Table B is derived from the 3rd field in Table A. For example:
Table A has the following State fields:
State Amount Stocks
CA 100.00 3
FL 200.00 5
Table B would have the following State fields:
State, Amount, Stock Date
CA 100.00 6/30/2002
FL 200.00 6/30/2000
The fields State and Amount would have the same values in both tables. However, the Stock field in Table A represents a number of years value. To derive the Stock Date for corresponding records in Table B, I start with a fixed date of 6/30/2005 (6/30 of the Current Year) and subtract the value of the Stock field in Table A for the same state record.
For example, the first record in Table A is for California and has a Stock value of 3. To derive the Stock Date field value to place in the Table B for the California record, I would take the fixed date of 6/30/2005 minus the Stock value of 3 which yields a Stock Date of 6/30/2002.
Table A has the following State fields:
State Amount Stocks
CA 100.00 3
FL 200.00 5
Table B would have the following State fields:
State, Amount, Stock Date
CA 100.00 6/30/2002
FL 200.00 6/30/2000
The fields State and Amount would have the same values in both tables. However, the Stock field in Table A represents a number of years value. To derive the Stock Date for corresponding records in Table B, I start with a fixed date of 6/30/2005 (6/30 of the Current Year) and subtract the value of the Stock field in Table A for the same state record.
For example, the first record in Table A is for California and has a Stock value of 3. To derive the Stock Date field value to place in the Table B for the California record, I would take the fixed date of 6/30/2005 minus the Stock value of 3 which yields a Stock Date of 6/30/2002.