I am designing a database and I have a table which contains a calculated column. The tables are illustrated below, the first table's name is ProjectDetails.TimeCard
, the second table is HumanResources.Employee
ProjectDetails.TimeCard [TimeCardID | EmployeeID(Foreignkey) | BillableHours | **TotalCost** ] HumanResources.Employee [EmployeeID(Primarykey) | Fname | Lname | **BillingRate** ]
Now TotalCost
is the calculated column, to be automatically computed as BillableHours*BillingRate
This requires that I set the calculated column of table A as the result of a calculation between another column in the same table and a column on a different table B.
Can I do this?