Creating a column referring to another column of the same table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'd like to add a column onto an existing table. The content of the column
should be a calculation based on what is stored another columns of the same
table.

E.g. table name is 'Contract' and reference fields are 'Duration' and
'Amount'. I want to add an Amortization column =
[Contract].[Amount]/[Contract].[Duration]
I used this structure but it says the field is not recognized.

Could you please tell me what the structure should be?
Thanks a lot,
Kanga
 
I'd like to add a column onto an existing table. The content of the column
should be a calculation based on what is stored another columns of the
same
table.

E.g. table name is 'Contract' and reference fields are 'Duration' and
'Amount'. I want to add an Amortization column =
[Contract].[Amount]/[Contract].[Duration]
I used this structure but it says the field is not recognized.

Could you please tell me what the structure should be?
Thanks a lot,
Kanga

Don't add a calculation to a table. Create a query using all the fields
from the table
and add the calculation to that.

Tom Lake
 
Hi Tom,
Thanks for such a quick response.
I just created the query. Is there a way for me to insert the query in the
table?
The database will be shared with multiple users and they should see this
field updated as soon as they enter data in the other columns. That is
without me running an update query after each record gets created.
Thanks again,
Kanga

Tom Lake said:
I'd like to add a column onto an existing table. The content of the column
should be a calculation based on what is stored another columns of the
same
table.

E.g. table name is 'Contract' and reference fields are 'Duration' and
'Amount'. I want to add an Amortization column =
[Contract].[Amount]/[Contract].[Duration]
I used this structure but it says the field is not recognized.

Could you please tell me what the structure should be?
Thanks a lot,
Kanga

Don't add a calculation to a table. Create a query using all the fields
from the table
and add the calculation to that.

Tom Lake
 
Back
Top