Sum of column in child table alongside parent table in view
Posted on 2014-08-01
I need the most efficient way (for the server, not for me) to sum all child rows for a given parent row, and display that sum alongside the parent row's columns in a view.
ie: I have the following Parent Table:
And a child table such as:
What I need is a view containing the following columns:
[Sum of all children's ChildValueColumn values]
What is the best method (least amount of processing for the server) to get sum of the child rows' ChildValueColumn column?
Thanks in advance,