I'm a noob guys, so don't be too harsh.

New to the forum, read around and couldn't fin d an answer. Maybe someone here knows if this works or not.

Building a computed column in the management studio, We'll call it total. When I enter this equation, it works:

Liquor + Beer + Wine + Food + NonAlc

When I enter this equation it fails and returns null:

Liquor + Beer + Wine + Food + NonAlc + NonAlc - Voucher

All fields are identical data types (money). Can't get it to work with mixed arguments. Anyone have any suggestions for me?

Thanks in advance.

有帮助吗?

解决方案

Do something like this

ISNULL(Liquor, 0) + ISNULL(Beer, 0) + ISNULL(Wine, 0) + ISNULL(Food, 0) 
      + ISNULL(NonAlc, 0) + ISNULL(NonAlc, 0) - ISNULL(Voucher, 0)

其他提示

Use this: Concat(Liquor , Beer ,Wine ,food ,NonAlc ,NonAlc - Voucher)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top