Complex Aggregate Expression in DataColumn

G

Guest

Say I wanted to do an aggregate sum (using the Northwind examples in MSDN
help) where relationships between 2 datatables exist, I would use:

SUM(Child.Price)

However, if I have a "IsDeleted" column in the child table, how would I
change the expression? I would need something like:

SUM(Child.Price WHERE Child.IsDeleted = 'FALSE')

Can anyone help me figure out what expression would work? Any tips would be
greatly appreciated.
 
G

Guest

Would an IFF() function would work inside the sum? Something like:

SUM(IFF(Child.IsDeleted = 'FALSE', Child.Price, 0))

Can anyone help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top