Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to maintain a value in calculated column
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01478568
Message ID:
01478576
Views:
29
>>However, if you need to keep it, you can create a calculated column in your table (you can even make it persistent).
>>
>>The calculation formula will be
>>
>>dbo.ufnTotalAmount(OrderID) where ufnTotalAmount will be a function in your database.
>>
>>I answered this question a few months ago with more code in T-SQL MSDN forum, but I believe this will be enough info for you.
>>
>>
>>Alternative solution will be in having triggers on the Child Table(s) that will update Parent's table.
>
>What is "persistent" column?

http://msdn.microsoft.com/en-us/library/ms191250.aspx
>
>I am learning towards a function in database since I have never done triggers.
>
>Thank you.

Either way will work - but I probably chose computed column myself.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform