The Problem: I have a Cost A and a Cost B. I need to add them together and display them as Cost C in my SQL select statement. Sometime both Cost A and Cost B are null.

The Solution: SELECT  CostA, CostB, IsNull(CostA, 0) + IsNull(CostB, 0) As CostC. Without the IsNull, the columns were not adding together.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.