5 Replies Latest reply on Jun 29, 2009 1:07 PM by Lumpia

    Add/Assign value to non-null text values


      I have a database which stores values (schedules) for each day of the month - such as whether a person is OFF or on VAC (vacation).  So, it would look something like this:


      John SmithOFFOFF
      Charlie MurphyTRN
      Ricky JamesVACVACVAC


      So, I need the "TOTAL" row to add up the columns where the value is non-null.  I was thinking that perhaps I could somehow assign a value of 1 to each in the columns, and then perform a sum.


      Can anyone assist in a Coldfusion solution or SQL Server 2005 solution?  Thanks.