Is it possible to translate an SQL if to a dynamic list? I've got SQL with a field clause:
if(isnull(sum(worship_credits.credits)),0,sum(worship_credits.credits)) AS credits_earned
Can I translate this to a dynamic list? Here's what I have without the IF to handle NULLs:
fields.DefineField(WorshipCreditsFieldIndex.Credits, 8, "credits_earned");
fields[8].AggregateFunctionToApply = AggregateFunction.Sum;
I feel like this may be obvious--but I'm not seeing it.
Thanks in advance for any help!