|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataColumn.Expression Filter on ChildI have a field in a parent row that needs to be set to the sum of a
field in its children. That part is easy enough, as follows: Sum(Child.ColumnName) However, I need to filter out some of the children rows for the sum. So what I want is something like this: Sum(Child.ColumnName) WHERE Child.OtherColumnName = 'Some String' I get an error which essentially states that there should be an operand to the right of "Where" Any ideas? Kelly Smith I don't think you'll be able to do it that way.
Instead I would do calculations myself. -- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ <flacmons***@gmail.com> wrote in message news:1170696685.558613.192720@k78g2000cwa.googlegroups.com... >I have a field in a parent row that needs to be set to the sum of a > field in its children. That part is easy enough, as follows: > > Sum(Child.ColumnName) > > However, I need to filter out some of the children rows for the sum. > So what I want is something like this: > > Sum(Child.ColumnName) WHERE Child.OtherColumnName = 'Some String' > > I get an error which essentially states that there should be an > operand to the right of "Where" > > Any ideas? > > Kelly Smith > |
|||||||||||||||||||||||