>>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