I have a stored procedure with the following sql statement:
GreaterExpenses = Case When expenses.reserve_amount > (Expenses.paid_total - Expenses.collection_total) Then Expenses.reserve_amount else (Expenses.paid_total - Expenses.Collection_total) End
This statement is not working because Expenses.paid_total and/or Expenses.collection_total and/or Expenses.Reserve_amount is null.
Any suggestions?
GreaterExpenses = Case When expenses.reserve_amount > (Expenses.paid_total - Expenses.collection_total) Then Expenses.reserve_amount else (Expenses.paid_total - Expenses.Collection_total) End
This statement is not working because Expenses.paid_total and/or Expenses.collection_total and/or Expenses.Reserve_amount is null.
Any suggestions?