I need some help building a SQL Server function that acts as a SumIf
in Excel, for example
SumIF(Fees.Fee_Amount, Fees.Type ='Services' and Fees.Fee_Code = 'B01')
so the item that would be summed if it is a Fees.Fee_Amount
and the where part is Fees.Type ='Services'
and Fees.Fee_Code = 'B01'
Syntax would be SumIf(TableName.ColumnName, Criteria)
, the function would return the total.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With