I need help creating a SQL Server function that acts like SumIfin Excel, for example
SumIF(Fees.Fee_Amount, Fees.Type ='Services' and Fees.Fee_Code = 'B01')
therefore, the element that will be summed if it is equal Fees.Fee_Amount, and where - Fees.Type ='Services'andFees.Fee_Code = 'B01'
The syntax will be SumIf(TableName.ColumnName, Criteria), the function will return the total number.
Bill source
share