In SQL 2000, is it possible to create a calculated table field that automatically calculates a value based on other table fields? Or must such a calculation be performed in the front-end application?
You can create a column field is computed based on other fields in the same table. Check out CREATE TABLE in BOL and scroll down to computed_column_expression. Examples H and I show you the T-SQL code. If you want a computed column based on values in another table, I believe you will need to use a trigger. Good luck!
--John
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.