Hi @ravi kumar ,
A computed column is computed from an expression that can use other columns in the same table. The expression can be a noncomputed column name, constant, function, and any combination of these connected by one or more operators. The expression cannot be a subquery.
You could refer Computed Columns.
A computed column cannot reference another computed column. You have these options:
- Create a second computed column that includes the same logic as the first computed column (which cannot be referenced).
- Replace the first computed column with an ordinary column.
- Create a VIEW on top of the table and implement your second column in it:
In your situation, you could try with second point as below:
ALTER TABLE dbo.CL_Register ADD Efficiency AS ((Output_Qty_Mtrs*100)/(Speed_mpm * 1440));
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.